• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Defines the Gauge component.
23 *
24 * @interface GaugeInterface
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 8
27 */
28/**
29 * Defines the Gauge component.
30 *
31 * @interface GaugeInterface
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @form
34 * @since 9
35 */
36/**
37 * Defines the Gauge component.
38 *
39 * @interface GaugeInterface
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @form
43 * @since 10
44 */
45/**
46 * Defines the Gauge component.
47 *
48 * @interface GaugeInterface
49 * @syscap SystemCapability.ArkUI.ArkUI.Full
50 * @crossplatform
51 * @form
52 * @atomicservice
53 * @since 11
54 */
55interface GaugeInterface {
56  /**
57   * value:Current data value.
58   * min: Current Segment Minimum Value
59   * max: Current Segment Maximum Value
60   *
61   * @param { object } options
62   * @returns { GaugeAttribute }
63   * @syscap SystemCapability.ArkUI.ArkUI.Full
64   * @since 8
65   */
66  /**
67   * value:Current data value.
68   * min: Current Segment Minimum Value
69   * max: Current Segment Maximum Value
70   *
71   * @param { object } options
72   * @returns { GaugeAttribute }
73   * @syscap SystemCapability.ArkUI.ArkUI.Full
74   * @form
75   * @since 9
76   */
77  /**
78   * value:Current data value.
79   * min: Current Segment Minimum Value
80   * max: Current Segment Maximum Value
81   *
82   * @param { object } options
83   * @returns { GaugeAttribute }
84   * @syscap SystemCapability.ArkUI.ArkUI.Full
85   * @crossplatform
86   * @form
87   * @since 10
88   */
89  /**
90   * value:Current data value.
91   * min: Current Segment Minimum Value
92   * max: Current Segment Maximum Value
93   *
94   * @param { object } options
95   * @returns { GaugeAttribute }
96   * @syscap SystemCapability.ArkUI.ArkUI.Full
97   * @crossplatform
98   * @form
99   * @atomicservice
100   * @since 11
101   */
102  (options: { value: number; min?: number; max?: number }): GaugeAttribute;
103}
104
105/**
106 * Defines the options of gauge track shadow.
107 *
108 * @interface GaugeShadowOptions
109 * @syscap SystemCapability.ArkUI.ArkUI.Full
110 * @crossplatform
111 * @since 11
112 */
113/**
114 * Defines the options of gauge track shadow.
115 *
116 * @interface GaugeShadowOptions
117 * @syscap SystemCapability.ArkUI.ArkUI.Full
118 * @crossplatform
119 * @atomicservice
120 * @since 12
121 */
122declare interface GaugeShadowOptions extends MultiShadowOptions {}
123
124/**
125 * Defines the options of gauge indicator.
126 *
127 * @interface GaugeIndicatorOptions
128 * @syscap SystemCapability.ArkUI.ArkUI.Full
129 * @crossplatform
130 * @since 11
131 */
132/**
133 * Defines the options of gauge indicator.
134 *
135 * @interface GaugeIndicatorOptions
136 * @syscap SystemCapability.ArkUI.ArkUI.Full
137 * @crossplatform
138 * @atomicservice
139 * @since 12
140 */
141declare interface GaugeIndicatorOptions {
142
143  /**
144   * Current indicator icon path.
145   *
146   * @type { ?ResourceStr } option type - the current option type.
147   * @default system style.
148   * @syscap SystemCapability.ArkUI.ArkUI.Full
149   * @crossplatform
150   * @since 11
151   */
152  /**
153   * Current indicator icon path.
154   *
155   * @type { ?ResourceStr } option type - the current option type.
156   * @default system style.
157   * @syscap SystemCapability.ArkUI.ArkUI.Full
158   * @crossplatform
159   * @atomicservice
160   * @since 12
161   */
162  icon?: ResourceStr;
163
164  /**
165   * Current indicator space.
166   *
167   * @type { ?Dimension } indicator space - the current indicator space.
168   * @default 8
169   * @syscap SystemCapability.ArkUI.ArkUI.Full
170   * @crossplatform
171   * @since 11
172   */
173  /**
174   * Current indicator space.
175   *
176   * @type { ?Dimension } indicator space - the current indicator space.
177   * @default 8
178   * @syscap SystemCapability.ArkUI.ArkUI.Full
179   * @crossplatform
180   * @atomicservice
181   * @since 12
182   */
183  space?: Dimension;
184}
185
186/**
187 * GaugeConfiguration used by content modifier
188 *
189 * @interface GaugeConfiguration
190 * @syscap SystemCapability.ArkUI.ArkUI.Full
191 * @crossplatform
192 * @atomicservice
193 * @since 12
194 */
195declare interface GaugeConfiguration extends CommonConfiguration<GaugeConfiguration> {
196  /**
197   * Current data value.
198   *
199   * @type { number } data value - the current data value.
200   * @syscap SystemCapability.ArkUI.ArkUI.Full
201   * @crossplatform
202   * @atomicservice
203   * @since 12
204   */
205  value: number;
206
207  /**
208   * Current Segment Minimum Value.
209   *
210   * @type { number } segment minimum value - the current segment minimum value.
211   * @syscap SystemCapability.ArkUI.ArkUI.Full
212   * @crossplatform
213   * @atomicservice
214   * @since 12
215   */
216  min: number;
217
218  /**
219   * Current Segment Maximum Value.
220   *
221   * @type { number } segment maximum value - the current segment maximum value.
222   * @syscap SystemCapability.ArkUI.ArkUI.Full
223   * @crossplatform
224   * @atomicservice
225   * @since 12
226   */
227  max: number;
228}
229
230/**
231 * @extends CommonMethod<GaugeAttribute>
232 * @syscap SystemCapability.ArkUI.ArkUI.Full
233 * @since 8
234 */
235/**
236 * @extends CommonMethod<GaugeAttribute>
237 * @syscap SystemCapability.ArkUI.ArkUI.Full
238 * @form
239 * @since 9
240 */
241/**
242 * @extends CommonMethod<GaugeAttribute>
243 * @syscap SystemCapability.ArkUI.ArkUI.Full
244 * @crossplatform
245 * @form
246 * @since 10
247 */
248/**
249 * @extends CommonMethod<GaugeAttribute>
250 * @syscap SystemCapability.ArkUI.ArkUI.Full
251 * @crossplatform
252 * @form
253 * @atomicservice
254 * @since 11
255 */
256declare class GaugeAttribute extends CommonMethod<GaugeAttribute> {
257  /**
258   * Sets the value for the current profile.
259   *
260   * @param { number } value
261   * @returns { GaugeAttribute }
262   * @syscap SystemCapability.ArkUI.ArkUI.Full
263   * @since 8
264   */
265  /**
266   * Sets the value for the current profile.
267   *
268   * @param { number } value
269   * @returns { GaugeAttribute }
270   * @syscap SystemCapability.ArkUI.ArkUI.Full
271   * @form
272   * @since 9
273   */
274  /**
275   * Sets the value for the current profile.
276   *
277   * @param { number } value
278   * @returns { GaugeAttribute }
279   * @syscap SystemCapability.ArkUI.ArkUI.Full
280   * @crossplatform
281   * @form
282   * @since 10
283   */
284  /**
285   * Sets the value for the current profile.
286   *
287   * @param { number } value
288   * @returns { GaugeAttribute }
289   * @syscap SystemCapability.ArkUI.ArkUI.Full
290   * @crossplatform
291   * @form
292   * @atomicservice
293   * @since 11
294   */
295  value(value: number): GaugeAttribute;
296
297  /**
298   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
299   *
300   * @param { number } angle
301   * @returns { GaugeAttribute }
302   * @syscap SystemCapability.ArkUI.ArkUI.Full
303   * @since 8
304   */
305  /**
306   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
307   *
308   * @param { number } angle
309   * @returns { GaugeAttribute }
310   * @syscap SystemCapability.ArkUI.ArkUI.Full
311   * @form
312   * @since 9
313   */
314  /**
315   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
316   *
317   * @param { number } angle
318   * @returns { GaugeAttribute }
319   * @syscap SystemCapability.ArkUI.ArkUI.Full
320   * @crossplatform
321   * @form
322   * @since 10
323   */
324  /**
325   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
326   *
327   * @param { number } angle
328   * @returns { GaugeAttribute }
329   * @syscap SystemCapability.ArkUI.ArkUI.Full
330   * @crossplatform
331   * @form
332   * @atomicservice
333   * @since 11
334   */
335  startAngle(angle: number): GaugeAttribute;
336
337  /**
338   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
339   *
340   * @param { number } angle
341   * @returns { GaugeAttribute }
342   * @syscap SystemCapability.ArkUI.ArkUI.Full
343   * @since 8
344   */
345  /**
346   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
347   *
348   * @param { number } angle
349   * @returns { GaugeAttribute }
350   * @syscap SystemCapability.ArkUI.ArkUI.Full
351   * @form
352   * @since 9
353   */
354  /**
355   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
356   *
357   * @param { number } angle
358   * @returns { GaugeAttribute }
359   * @syscap SystemCapability.ArkUI.ArkUI.Full
360   * @crossplatform
361   * @form
362   * @since 10
363   */
364  /**
365   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
366   *
367   * @param { number } angle
368   * @returns { GaugeAttribute }
369   * @syscap SystemCapability.ArkUI.ArkUI.Full
370   * @crossplatform
371   * @form
372   * @atomicservice
373   * @since 11
374   */
375  endAngle(angle: number): GaugeAttribute;
376
377  /**
378   * Set the color of the chart. You can set the solid color and segmented gradient color.
379   *
380   * @param { Array<any> } colors
381   * @returns { GaugeAttribute }
382   * @syscap SystemCapability.ArkUI.ArkUI.Full
383   * @since 8
384   */
385  /**
386   * Set the color of the chart. You can set the solid color and segmented gradient color.
387   *
388   * @param { Array<any> } colors
389   * @returns { GaugeAttribute }
390   * @syscap SystemCapability.ArkUI.ArkUI.Full
391   * @form
392   * @since 9
393   */
394  /**
395   * Set the color of the chart. You can set the solid color and segmented gradient color.
396   *
397   * @param { Array<[ResourceColor, number]> } colors - section colors of gauge drawing.
398   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
399   * @syscap SystemCapability.ArkUI.ArkUI.Full
400   * @crossplatform
401   * @form
402   * @since 10
403   */
404  /**
405   * Set the color of the chart. You can set the solid color and segmented gradient color.
406   *
407   * @param { ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]> } colors - section colors of gauge drawing.
408   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
409   * @syscap SystemCapability.ArkUI.ArkUI.Full
410   * @crossplatform
411   * @form
412   * @atomicservice
413   * @since 11
414   */
415  colors(colors: ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]>): GaugeAttribute;
416
417  /**
418   * Sets the thickness of the ring chart.
419   *
420   * @param { Length } length
421   * @returns { GaugeAttribute }
422   * @syscap SystemCapability.ArkUI.ArkUI.Full
423   * @since 8
424   */
425  /**
426   * Sets the thickness of the ring chart.
427   *
428   * @param { Length } length
429   * @returns { GaugeAttribute }
430   * @syscap SystemCapability.ArkUI.ArkUI.Full
431   * @form
432   * @since 9
433   */
434  /**
435   * Sets the thickness of the ring chart.
436   *
437   * @param { Length } length
438   * @returns { GaugeAttribute }
439   * @syscap SystemCapability.ArkUI.ArkUI.Full
440   * @crossplatform
441   * @form
442   * @since 10
443   */
444  /**
445   * Sets the thickness of the ring chart.
446   *
447   * @param { Length } length
448   * @returns { GaugeAttribute }
449   * @syscap SystemCapability.ArkUI.ArkUI.Full
450   * @crossplatform
451   * @form
452   * @atomicservice
453   * @since 11
454   */
455  strokeWidth(length: Length): GaugeAttribute;
456
457  /**
458   * Sets description content of the ring chart.
459   *
460   * @param { CustomBuilder } value - description content builder of the gauge drawing.
461   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
462   * @syscap SystemCapability.ArkUI.ArkUI.Full
463   * @crossplatform
464   * @since 11
465   */
466  /**
467   * Sets description content of the ring chart.
468   *
469   * @param { CustomBuilder } value - description content builder of the gauge drawing.
470   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
471   * @syscap SystemCapability.ArkUI.ArkUI.Full
472   * @crossplatform
473   * @atomicservice
474   * @since 12
475   */
476  description(value: CustomBuilder): GaugeAttribute;
477
478  /**
479   * Sets track shadow of the ring chart.
480   *
481   * @param { GaugeShadowOptions } value - track shadow options of the gauge drawing.
482   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
483   * @syscap SystemCapability.ArkUI.ArkUI.Full
484   * @crossplatform
485   * @since 11
486   */
487  /**
488   * Sets track shadow of the ring chart.
489   *
490   * @param { GaugeShadowOptions } value - track shadow options of the gauge drawing.
491   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
492   * @syscap SystemCapability.ArkUI.ArkUI.Full
493   * @crossplatform
494   * @atomicservice
495   * @since 12
496   */
497  trackShadow(value: GaugeShadowOptions): GaugeAttribute;
498
499  /**
500   * Sets indicator options of the ring chart.
501   *
502   * @param { GaugeIndicatorOptions } value - indicator options of the gauge drawing.
503   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
504   * @syscap SystemCapability.ArkUI.ArkUI.Full
505   * @crossplatform
506   * @since 11
507   */
508  /**
509   * Sets indicator options of the ring chart.
510   *
511   * @param { GaugeIndicatorOptions } value - indicator options of the gauge drawing.
512   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
513   * @syscap SystemCapability.ArkUI.ArkUI.Full
514   * @crossplatform
515   * @atomicservice
516   * @since 12
517   */
518  indicator(value: GaugeIndicatorOptions): GaugeAttribute;
519
520  /**
521   * Set the content modifier of gauge.
522   *
523   * @param { ContentModifier<GaugeConfiguration> } modifier - The content modifier of gauge.
524   * @returns { GaugeAttribute }
525   * @syscap SystemCapability.ArkUI.ArkUI.Full
526   * @crossplatform
527   * @atomicservice
528   * @since 12
529   */
530  contentModifier(modifier: ContentModifier<GaugeConfiguration>): GaugeAttribute;
531
532  /**
533   * Sets if mark to privacy sensitive.
534   *
535   * @param { Optional<boolean> } isPrivacySensitiveMode - indicates if mark to  privacy sensitive .
536   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
537   * @syscap SystemCapability.ArkUI.ArkUI.Full
538   * @crossplatform
539   * @form
540   * @atomicservice
541   * @since 12
542   */
543    privacySensitive(isPrivacySensitiveMode: Optional<boolean>): GaugeAttribute;
544}
545
546/**
547 * Defines Gauge Component.
548 *
549 * @syscap SystemCapability.ArkUI.ArkUI.Full
550 * @since 8
551 */
552/**
553 * Defines Gauge Component.
554 *
555 * @syscap SystemCapability.ArkUI.ArkUI.Full
556 * @form
557 * @since 9
558 */
559/**
560 * Defines Gauge Component.
561 *
562 * @syscap SystemCapability.ArkUI.ArkUI.Full
563 * @crossplatform
564 * @form
565 * @since 10
566 */
567/**
568 * Defines Gauge Component.
569 *
570 * @syscap SystemCapability.ArkUI.ArkUI.Full
571 * @crossplatform
572 * @form
573 * @atomicservice
574 * @since 11
575 */
576declare const Gauge: GaugeInterface;
577
578/**
579 * Defines Gauge Component instance.
580 *
581 * @syscap SystemCapability.ArkUI.ArkUI.Full
582 * @since 8
583 */
584/**
585 * Defines Gauge Component instance.
586 *
587 * @syscap SystemCapability.ArkUI.ArkUI.Full
588 * @form
589 * @since 9
590 */
591/**
592 * Defines Gauge Component instance.
593 *
594 * @syscap SystemCapability.ArkUI.ArkUI.Full
595 * @crossplatform
596 * @form
597 * @since 10
598 */
599/**
600 * Defines Gauge Component instance.
601 *
602 * @syscap SystemCapability.ArkUI.ArkUI.Full
603 * @crossplatform
604 * @form
605 * @atomicservice
606 * @since 11
607 */
608declare const GaugeInstance: GaugeAttribute;
609
610