• 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 Gauge constructor options.
23 *
24 * @interface GaugeOptions
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @crossplatform
27 * @form
28 * @atomicservice
29 * @since 18
30 */
31interface GaugeOptions {
32  /**
33   * Set current data value.
34   *
35   * @type { number }
36   * @syscap SystemCapability.ArkUI.ArkUI.Full
37   * @since 8
38   */
39  /**
40   * Set current data value.
41   *
42   * @type { number }
43   * @syscap SystemCapability.ArkUI.ArkUI.Full
44   * @form
45   * @since 9
46   */
47  /**
48   * Set current data value.
49   *
50   * @type { number }
51   * @syscap SystemCapability.ArkUI.ArkUI.Full
52   * @crossplatform
53   * @form
54   * @since 10
55   */
56  /**
57   * Set current data value.
58   *
59   * @type { number }
60   * @syscap SystemCapability.ArkUI.ArkUI.Full
61   * @crossplatform
62   * @form
63   * @atomicservice
64   * @since 11
65   */
66  /**
67   * Set current data value.
68   * Anonymous Object Rectification.
69   *
70   * @type { number }
71   * @syscap SystemCapability.ArkUI.ArkUI.Full
72   * @crossplatform
73   * @form
74   * @atomicservice
75   * @since 18
76   */
77  value: number;
78
79  /**
80   * Set current segment minimum value.
81   *
82   * @type { ?number }
83   * @syscap SystemCapability.ArkUI.ArkUI.Full
84   * @since 8
85   */
86  /**
87   * Set current segment minimum value.
88   *
89   * @type { ?number }
90   * @syscap SystemCapability.ArkUI.ArkUI.Full
91   * @form
92   * @since 9
93   */
94  /**
95   * Set current segment minimum value.
96   *
97   * @type { ?number }
98   * @syscap SystemCapability.ArkUI.ArkUI.Full
99   * @crossplatform
100   * @form
101   * @since 10
102   */
103  /**
104   * Set current segment minimum value.
105   *
106   * @type { ?number }
107   * @syscap SystemCapability.ArkUI.ArkUI.Full
108   * @crossplatform
109   * @form
110   * @atomicservice
111   * @since 11
112   */
113  /**
114   * Set current segment minimum value.
115   * Anonymous Object Rectification.
116   *
117   * @type { ?number }
118   * @syscap SystemCapability.ArkUI.ArkUI.Full
119   * @crossplatform
120   * @form
121   * @atomicservice
122   * @since 18
123   */
124  min?: number;
125
126  /**
127   * Set current segment maximum value.
128   *
129   * @type { ?number }
130   * @syscap SystemCapability.ArkUI.ArkUI.Full
131   * @since 8
132   */
133  /**
134   * Set current segment maximum value.
135   *
136   * @type { ?number }
137   * @syscap SystemCapability.ArkUI.ArkUI.Full
138   * @form
139   * @since 9
140   */
141  /**
142   * Set current segment maximum value.
143   *
144   * @type { ?number }
145   * @syscap SystemCapability.ArkUI.ArkUI.Full
146   * @crossplatform
147   * @form
148   * @since 10
149   */
150  /**
151   * Set current segment maximum value.
152   *
153   * @type { ?number }
154   * @syscap SystemCapability.ArkUI.ArkUI.Full
155   * @crossplatform
156   * @form
157   * @atomicservice
158   * @since 11
159   */
160  /**
161   * Set current segment maximum value.
162   * Anonymous Object Rectification.
163   *
164   * @type { ?number }
165   * @syscap SystemCapability.ArkUI.ArkUI.Full
166   * @crossplatform
167   * @form
168   * @atomicservice
169   * @since 18
170   */
171  max?: number;
172}
173
174/**
175 * Defines the Gauge component.
176 *
177 * @interface GaugeInterface
178 * @syscap SystemCapability.ArkUI.ArkUI.Full
179 * @since 8
180 */
181/**
182 * Defines the Gauge component.
183 *
184 * @interface GaugeInterface
185 * @syscap SystemCapability.ArkUI.ArkUI.Full
186 * @form
187 * @since 9
188 */
189/**
190 * Defines the Gauge component.
191 *
192 * @interface GaugeInterface
193 * @syscap SystemCapability.ArkUI.ArkUI.Full
194 * @crossplatform
195 * @form
196 * @since 10
197 */
198/**
199 * Defines the Gauge component.
200 *
201 * @interface GaugeInterface
202 * @syscap SystemCapability.ArkUI.ArkUI.Full
203 * @crossplatform
204 * @form
205 * @atomicservice
206 * @since 11
207 */
208interface GaugeInterface {
209  /**
210   * value:Current data value.
211   * min: Current Segment Minimum Value
212   * max: Current Segment Maximum Value
213   *
214   * @param { object } options
215   * @returns { GaugeAttribute }
216   * @syscap SystemCapability.ArkUI.ArkUI.Full
217   * @since 8
218   */
219  /**
220   * value:Current data value.
221   * min: Current Segment Minimum Value
222   * max: Current Segment Maximum Value
223   *
224   * @param { object } options
225   * @returns { GaugeAttribute }
226   * @syscap SystemCapability.ArkUI.ArkUI.Full
227   * @form
228   * @since 9
229   */
230  /**
231   * value:Current data value.
232   * min: Current Segment Minimum Value
233   * max: Current Segment Maximum Value
234   *
235   * @param { object } options
236   * @returns { GaugeAttribute }
237   * @syscap SystemCapability.ArkUI.ArkUI.Full
238   * @crossplatform
239   * @form
240   * @since 10
241   */
242  /**
243   * value:Current data value.
244   * min: Current Segment Minimum Value
245   * max: Current Segment Maximum Value
246   *
247   * @param { object } options
248   * @returns { GaugeAttribute }
249   * @syscap SystemCapability.ArkUI.ArkUI.Full
250   * @crossplatform
251   * @form
252   * @atomicservice
253   * @since 11
254   */
255  /**
256   * Called when the gauge component is used.
257   * Anonymous Object Rectification.
258   *
259   * @param { GaugeOptions } options - Gauge options.
260   * @returns { GaugeAttribute }
261   * @syscap SystemCapability.ArkUI.ArkUI.Full
262   * @crossplatform
263   * @form
264   * @atomicservice
265   * @since 18
266   */
267  (options: GaugeOptions): GaugeAttribute;
268}
269
270/**
271 * Defines the options of gauge track shadow.
272 *
273 * @extends MultiShadowOptions
274 * @interface GaugeShadowOptions
275 * @syscap SystemCapability.ArkUI.ArkUI.Full
276 * @crossplatform
277 * @since 11
278 */
279/**
280 * Defines the options of gauge track shadow.
281 *
282 * @extends MultiShadowOptions
283 * @interface GaugeShadowOptions
284 * @syscap SystemCapability.ArkUI.ArkUI.Full
285 * @crossplatform
286 * @atomicservice
287 * @since 12
288 */
289declare interface GaugeShadowOptions extends MultiShadowOptions {}
290
291/**
292 * Defines the options of gauge indicator.
293 *
294 * @interface GaugeIndicatorOptions
295 * @syscap SystemCapability.ArkUI.ArkUI.Full
296 * @crossplatform
297 * @since 11
298 */
299/**
300 * Defines the options of gauge indicator.
301 *
302 * @interface GaugeIndicatorOptions
303 * @syscap SystemCapability.ArkUI.ArkUI.Full
304 * @crossplatform
305 * @atomicservice
306 * @since 12
307 */
308declare interface GaugeIndicatorOptions {
309
310  /**
311   * Current indicator icon path.
312   *
313   * @type { ?ResourceStr } option type - the current option type.
314   * @default system style.
315   * @syscap SystemCapability.ArkUI.ArkUI.Full
316   * @crossplatform
317   * @since 11
318   */
319  /**
320   * Current indicator icon path.
321   *
322   * @type { ?ResourceStr } option type - the current option type.
323   * @default system style.
324   * @syscap SystemCapability.ArkUI.ArkUI.Full
325   * @crossplatform
326   * @atomicservice
327   * @since 12
328   */
329  icon?: ResourceStr;
330
331  /**
332   * Current indicator space.
333   *
334   * @type { ?Dimension } indicator space - the current indicator space.
335   * @default 8
336   * @syscap SystemCapability.ArkUI.ArkUI.Full
337   * @crossplatform
338   * @since 11
339   */
340  /**
341   * Current indicator space.
342   *
343   * @type { ?Dimension } indicator space - the current indicator space.
344   * @default 8
345   * @syscap SystemCapability.ArkUI.ArkUI.Full
346   * @crossplatform
347   * @atomicservice
348   * @since 12
349   */
350  space?: Dimension;
351}
352
353/**
354 * GaugeConfiguration used by content modifier
355 *
356 * @extends CommonConfiguration<GaugeConfiguration>
357 * @interface GaugeConfiguration
358 * @syscap SystemCapability.ArkUI.ArkUI.Full
359 * @crossplatform
360 * @atomicservice
361 * @since 12
362 */
363declare interface GaugeConfiguration extends CommonConfiguration<GaugeConfiguration> {
364  /**
365   * Current data value.
366   *
367   * @type { number } data value - the current data value.
368   * @syscap SystemCapability.ArkUI.ArkUI.Full
369   * @crossplatform
370   * @atomicservice
371   * @since 12
372   */
373  value: number;
374
375  /**
376   * Current Segment Minimum Value.
377   *
378   * @type { number } segment minimum value - the current segment minimum value.
379   * @syscap SystemCapability.ArkUI.ArkUI.Full
380   * @crossplatform
381   * @atomicservice
382   * @since 12
383   */
384  min: number;
385
386  /**
387   * Current Segment Maximum Value.
388   *
389   * @type { number } segment maximum value - the current segment maximum value.
390   * @syscap SystemCapability.ArkUI.ArkUI.Full
391   * @crossplatform
392   * @atomicservice
393   * @since 12
394   */
395  max: number;
396}
397
398/**
399 * @extends CommonMethod<GaugeAttribute>
400 * @syscap SystemCapability.ArkUI.ArkUI.Full
401 * @since 8
402 */
403/**
404 * @extends CommonMethod<GaugeAttribute>
405 * @syscap SystemCapability.ArkUI.ArkUI.Full
406 * @form
407 * @since 9
408 */
409/**
410 * @extends CommonMethod<GaugeAttribute>
411 * @syscap SystemCapability.ArkUI.ArkUI.Full
412 * @crossplatform
413 * @form
414 * @since 10
415 */
416/**
417 * @extends CommonMethod<GaugeAttribute>
418 * @syscap SystemCapability.ArkUI.ArkUI.Full
419 * @crossplatform
420 * @form
421 * @atomicservice
422 * @since 11
423 */
424declare class GaugeAttribute extends CommonMethod<GaugeAttribute> {
425  /**
426   * Sets the value for the current profile.
427   *
428   * @param { number } value
429   * @returns { GaugeAttribute }
430   * @syscap SystemCapability.ArkUI.ArkUI.Full
431   * @since 8
432   */
433  /**
434   * Sets the value for the current profile.
435   *
436   * @param { number } value
437   * @returns { GaugeAttribute }
438   * @syscap SystemCapability.ArkUI.ArkUI.Full
439   * @form
440   * @since 9
441   */
442  /**
443   * Sets the value for the current profile.
444   *
445   * @param { number } value
446   * @returns { GaugeAttribute }
447   * @syscap SystemCapability.ArkUI.ArkUI.Full
448   * @crossplatform
449   * @form
450   * @since 10
451   */
452  /**
453   * Sets the value for the current profile.
454   *
455   * @param { number } value
456   * @returns { GaugeAttribute }
457   * @syscap SystemCapability.ArkUI.ArkUI.Full
458   * @crossplatform
459   * @form
460   * @atomicservice
461   * @since 11
462   */
463  value(value: number): GaugeAttribute;
464
465  /**
466   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
467   *
468   * @param { number } angle
469   * @returns { GaugeAttribute }
470   * @syscap SystemCapability.ArkUI.ArkUI.Full
471   * @since 8
472   */
473  /**
474   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
475   *
476   * @param { number } angle
477   * @returns { GaugeAttribute }
478   * @syscap SystemCapability.ArkUI.ArkUI.Full
479   * @form
480   * @since 9
481   */
482  /**
483   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
484   *
485   * @param { number } angle
486   * @returns { GaugeAttribute }
487   * @syscap SystemCapability.ArkUI.ArkUI.Full
488   * @crossplatform
489   * @form
490   * @since 10
491   */
492  /**
493   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
494   *
495   * @param { number } angle
496   * @returns { GaugeAttribute }
497   * @syscap SystemCapability.ArkUI.ArkUI.Full
498   * @crossplatform
499   * @form
500   * @atomicservice
501   * @since 11
502   */
503  startAngle(angle: number): GaugeAttribute;
504
505  /**
506   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
507   *
508   * @param { number } angle
509   * @returns { GaugeAttribute }
510   * @syscap SystemCapability.ArkUI.ArkUI.Full
511   * @since 8
512   */
513  /**
514   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
515   *
516   * @param { number } angle
517   * @returns { GaugeAttribute }
518   * @syscap SystemCapability.ArkUI.ArkUI.Full
519   * @form
520   * @since 9
521   */
522  /**
523   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
524   *
525   * @param { number } angle
526   * @returns { GaugeAttribute }
527   * @syscap SystemCapability.ArkUI.ArkUI.Full
528   * @crossplatform
529   * @form
530   * @since 10
531   */
532  /**
533   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
534   *
535   * @param { number } angle
536   * @returns { GaugeAttribute }
537   * @syscap SystemCapability.ArkUI.ArkUI.Full
538   * @crossplatform
539   * @form
540   * @atomicservice
541   * @since 11
542   */
543  endAngle(angle: number): GaugeAttribute;
544
545  /**
546   * Set the color of the chart. You can set the solid color and segmented gradient color.
547   *
548   * @param { Array<any> } colors
549   * @returns { GaugeAttribute }
550   * @syscap SystemCapability.ArkUI.ArkUI.Full
551   * @since 8
552   */
553  /**
554   * Set the color of the chart. You can set the solid color and segmented gradient color.
555   *
556   * @param { Array<any> } colors
557   * @returns { GaugeAttribute }
558   * @syscap SystemCapability.ArkUI.ArkUI.Full
559   * @form
560   * @since 9
561   */
562  /**
563   * Set the color of the chart. You can set the solid color and segmented gradient color.
564   *
565   * @param { Array<[ResourceColor, number]> } colors - section colors of gauge drawing.
566   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
567   * @syscap SystemCapability.ArkUI.ArkUI.Full
568   * @crossplatform
569   * @form
570   * @since 10
571   */
572  /**
573   * Set the color of the chart. You can set the solid color and segmented gradient color.
574   *
575   * @param { ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]> } colors - section colors of gauge drawing.
576   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
577   * @syscap SystemCapability.ArkUI.ArkUI.Full
578   * @crossplatform
579   * @form
580   * @atomicservice
581   * @since 11
582   */
583  colors(colors: ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]>): GaugeAttribute;
584
585  /**
586   * Sets the thickness of the ring chart.
587   *
588   * @param { Length } length
589   * @returns { GaugeAttribute }
590   * @syscap SystemCapability.ArkUI.ArkUI.Full
591   * @since 8
592   */
593  /**
594   * Sets the thickness of the ring chart.
595   *
596   * @param { Length } length
597   * @returns { GaugeAttribute }
598   * @syscap SystemCapability.ArkUI.ArkUI.Full
599   * @form
600   * @since 9
601   */
602  /**
603   * Sets the thickness of the ring chart.
604   *
605   * @param { Length } length
606   * @returns { GaugeAttribute }
607   * @syscap SystemCapability.ArkUI.ArkUI.Full
608   * @crossplatform
609   * @form
610   * @since 10
611   */
612  /**
613   * Sets the thickness of the ring chart.
614   *
615   * @param { Length } length
616   * @returns { GaugeAttribute }
617   * @syscap SystemCapability.ArkUI.ArkUI.Full
618   * @crossplatform
619   * @form
620   * @atomicservice
621   * @since 11
622   */
623  strokeWidth(length: Length): GaugeAttribute;
624
625  /**
626   * Sets description content of the ring chart.
627   *
628   * @param { CustomBuilder } value - description content builder of the gauge drawing.
629   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
630   * @syscap SystemCapability.ArkUI.ArkUI.Full
631   * @crossplatform
632   * @since 11
633   */
634  /**
635   * Sets description content of the ring chart.
636   *
637   * @param { CustomBuilder } value - description content builder of the gauge drawing.
638   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
639   * @syscap SystemCapability.ArkUI.ArkUI.Full
640   * @crossplatform
641   * @atomicservice
642   * @since 12
643   */
644  description(value: CustomBuilder): GaugeAttribute;
645
646  /**
647   * Sets track shadow of the ring chart.
648   *
649   * @param { GaugeShadowOptions } value - track shadow options of the gauge drawing.
650   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
651   * @syscap SystemCapability.ArkUI.ArkUI.Full
652   * @crossplatform
653   * @since 11
654   */
655  /**
656   * Sets track shadow of the ring chart.
657   *
658   * @param { GaugeShadowOptions } value - track shadow options of the gauge drawing.
659   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
660   * @syscap SystemCapability.ArkUI.ArkUI.Full
661   * @crossplatform
662   * @atomicservice
663   * @since 12
664   */
665  trackShadow(value: GaugeShadowOptions): GaugeAttribute;
666
667  /**
668   * Sets indicator options of the ring chart.
669   *
670   * @param { GaugeIndicatorOptions } value - indicator options of the gauge drawing.
671   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
672   * @syscap SystemCapability.ArkUI.ArkUI.Full
673   * @crossplatform
674   * @since 11
675   */
676  /**
677   * Sets indicator options of the ring chart.
678   *
679   * @param { GaugeIndicatorOptions } value - indicator options of the gauge drawing.
680   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
681   * @syscap SystemCapability.ArkUI.ArkUI.Full
682   * @crossplatform
683   * @atomicservice
684   * @since 12
685   */
686  indicator(value: GaugeIndicatorOptions): GaugeAttribute;
687
688  /**
689   * Sets if mark to privacy sensitive.
690   *
691   * @param { Optional<boolean> } isPrivacySensitiveMode - indicates if mark to  privacy sensitive .
692   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
693   * @syscap SystemCapability.ArkUI.ArkUI.Full
694   * @crossplatform
695   * @form
696   * @atomicservice
697   * @since 12
698   */
699  privacySensitive(isPrivacySensitiveMode: Optional<boolean>): GaugeAttribute;
700
701  /**
702   * Set the content modifier of gauge.
703   *
704   * @param { ContentModifier<GaugeConfiguration> } modifier - The content modifier of gauge.
705   * @returns { GaugeAttribute }
706   * @syscap SystemCapability.ArkUI.ArkUI.Full
707   * @crossplatform
708   * @atomicservice
709   * @since 12
710   */
711  contentModifier(modifier: ContentModifier<GaugeConfiguration>): GaugeAttribute;
712}
713
714/**
715 * Defines Gauge Component.
716 *
717 * @syscap SystemCapability.ArkUI.ArkUI.Full
718 * @since 8
719 */
720/**
721 * Defines Gauge Component.
722 *
723 * @syscap SystemCapability.ArkUI.ArkUI.Full
724 * @form
725 * @since 9
726 */
727/**
728 * Defines Gauge Component.
729 *
730 * @syscap SystemCapability.ArkUI.ArkUI.Full
731 * @crossplatform
732 * @form
733 * @since 10
734 */
735/**
736 * Defines Gauge Component.
737 *
738 * @syscap SystemCapability.ArkUI.ArkUI.Full
739 * @crossplatform
740 * @form
741 * @atomicservice
742 * @since 11
743 */
744declare const Gauge: GaugeInterface;
745
746/**
747 * Defines Gauge Component instance.
748 *
749 * @syscap SystemCapability.ArkUI.ArkUI.Full
750 * @since 8
751 */
752/**
753 * Defines Gauge Component instance.
754 *
755 * @syscap SystemCapability.ArkUI.ArkUI.Full
756 * @form
757 * @since 9
758 */
759/**
760 * Defines Gauge Component instance.
761 *
762 * @syscap SystemCapability.ArkUI.ArkUI.Full
763 * @crossplatform
764 * @form
765 * @since 10
766 */
767/**
768 * Defines Gauge Component instance.
769 *
770 * @syscap SystemCapability.ArkUI.ArkUI.Full
771 * @crossplatform
772 * @form
773 * @atomicservice
774 * @since 11
775 */
776declare const GaugeInstance: GaugeAttribute;
777
778