• 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 * DataPanelType enum
18 *
19 * @enum { number }
20 * @syscap SystemCapability.ArkUI.ArkUI.Full
21 * @since 8
22 */
23/**
24 * DataPanelType enum
25 *
26 * @enum { number }
27 * @syscap SystemCapability.ArkUI.ArkUI.Full
28 * @since 9
29 * @form
30 */
31/**
32 * DataPanelType enum
33 *
34 * @enum { number }
35 * @syscap SystemCapability.ArkUI.ArkUI.Full
36 * @crossplatform
37 * @since 10
38 * @form
39 */
40/**
41 * DataPanelType enum
42 *
43 * @enum { number }
44 * @syscap SystemCapability.ArkUI.ArkUI.Full
45 * @crossplatform
46 * @atomicservice
47 * @since 11
48 * @form
49 */
50declare enum DataPanelType {
51  /**
52   * Line Type
53   *
54   * @syscap SystemCapability.ArkUI.ArkUI.Full
55   * @since 8
56   */
57  /**
58   * Line Type
59   *
60   * @syscap SystemCapability.ArkUI.ArkUI.Full
61   * @since 9
62   * @form
63   */
64  /**
65   * Line Type
66   *
67   * @syscap SystemCapability.ArkUI.ArkUI.Full
68   * @crossplatform
69   * @since 10
70   * @form
71   */
72  /**
73   * Line Type
74   *
75   * @syscap SystemCapability.ArkUI.ArkUI.Full
76   * @crossplatform
77   * @atomicservice
78   * @since 11
79   * @form
80   */
81  Line,
82
83  /**
84   * Line Rainbow
85   *
86   * @syscap SystemCapability.ArkUI.ArkUI.Full
87   * @since 8
88   */
89  /**
90   * Line Rainbow
91   *
92   * @syscap SystemCapability.ArkUI.ArkUI.Full
93   * @since 9
94   * @form
95   */
96  /**
97   * Line Rainbow
98   *
99   * @syscap SystemCapability.ArkUI.ArkUI.Full
100   * @crossplatform
101   * @since 10
102   * @form
103   */
104  /**
105   * Line Rainbow
106   *
107   * @syscap SystemCapability.ArkUI.ArkUI.Full
108   * @crossplatform
109   * @atomicservice
110   * @since 11
111   * @form
112   */
113  Circle,
114}
115
116/**
117 * ColorStop type
118 * @syscap SystemCapability.ArkUI.ArkUI.Full
119 * @crossplatform
120 * @since 10
121 */
122/**
123 * ColorStop type
124 * @syscap SystemCapability.ArkUI.ArkUI.Full
125 * @crossplatform
126 * @atomicservice
127 * @since 11
128 */
129declare type ColorStop = {
130  /**
131   * Color property.
132   * @type { ResourceColor } color - the color value.
133   * @syscap SystemCapability.ArkUI.ArkUI.Full
134   * @crossplatform
135   * @since 10
136   */
137  /**
138   * Color property.
139   * @type { ResourceColor } color - the color value.
140   * @syscap SystemCapability.ArkUI.ArkUI.Full
141   * @crossplatform
142   * @atomicservice
143   * @since 11
144   */
145  color: ResourceColor;
146
147  /**
148   * Offset property.
149   * @type { Length } offset - the color offset.
150   * @syscap SystemCapability.ArkUI.ArkUI.Full
151   * @crossplatform
152   * @since 10
153   */
154  /**
155   * Offset property.
156   * @type { Length } offset - the color offset.
157   * @syscap SystemCapability.ArkUI.ArkUI.Full
158   * @crossplatform
159   * @atomicservice
160   * @since 11
161   */
162  offset: Length;
163}
164
165/**
166 * LinearGradient class
167 *
168 * @syscap SystemCapability.ArkUI.ArkUI.Full
169 * @crossplatform
170 * @since 10
171 */
172/**
173 * LinearGradient class
174 *
175 * @syscap SystemCapability.ArkUI.ArkUI.Full
176 * @crossplatform
177 * @atomicservice
178 * @since 11
179 */
180declare class LinearGradient {
181  /**
182   * Constructor.
183   *
184   * @param { ColorStop[] } colorStops - the LinearGradient constructor parameter.
185   * @syscap SystemCapability.ArkUI.ArkUI.Full
186   * @crossplatform
187   * @since 10
188   */
189  /**
190   * Constructor.
191   *
192   * @param { ColorStop[] } colorStops - the LinearGradient constructor parameter.
193   * @syscap SystemCapability.ArkUI.ArkUI.Full
194   * @crossplatform
195   * @atomicservice
196   * @since 11
197   */
198  constructor(colorStops: ColorStop[]);
199}
200
201/**
202 * Defines the options of Shadow.
203 *
204 * @interface DataPanelShadowOptions
205 * @syscap SystemCapability.ArkUI.ArkUI.Full
206 * @crossplatform
207 * @since 10
208 */
209/**
210 * Defines the options of Shadow.
211 *
212 * @interface DataPanelShadowOptions
213 * @syscap SystemCapability.ArkUI.ArkUI.Full
214 * @crossplatform
215 * @atomicservice
216 * @since 11
217 */
218declare interface DataPanelShadowOptions extends MultiShadowOptions {
219  /**
220   * Current shadow colors.
221   *
222   * @type { ?Array<ResourceColor | LinearGradient> }
223   * @default Consistent with valueColors
224   * @syscap SystemCapability.ArkUI.ArkUI.Full
225   * @crossplatform
226   * @since 10
227   */
228  /**
229   * Current shadow colors.
230   *
231   * @type { ?Array<ResourceColor | LinearGradient> }
232   * @default Consistent with valueColors
233   * @syscap SystemCapability.ArkUI.ArkUI.Full
234   * @crossplatform
235   * @atomicservice
236   * @since 11
237   */
238  colors?: Array<ResourceColor | LinearGradient>;
239}
240
241/**
242 * Defines the options of DataPanel.
243 *
244 * @interface DataPanelOptions
245 * @syscap SystemCapability.ArkUI.ArkUI.Full
246 * @since 7
247 */
248/**
249 * Defines the options of DataPanel.
250 *
251 * @interface DataPanelOptions
252 * @syscap SystemCapability.ArkUI.ArkUI.Full
253 * @since 9
254 * @form
255 */
256/**
257 * Defines the options of DataPanel.
258 *
259 * @interface DataPanelOptions
260 * @syscap SystemCapability.ArkUI.ArkUI.Full
261 * @crossplatform
262 * @since 10
263 * @form
264 */
265/**
266 * Defines the options of DataPanel.
267 *
268 * @interface DataPanelOptions
269 * @syscap SystemCapability.ArkUI.ArkUI.Full
270 * @crossplatform
271 * @atomicservice
272 * @since 11
273 * @form
274 */
275declare interface DataPanelOptions {
276  /**
277   * Current data value. the max length is 9.
278   *
279   * @type { number[] }
280   * @syscap SystemCapability.ArkUI.ArkUI.Full
281   * @since 7
282   */
283  /**
284   * Current data value. the max length is 9.
285   *
286   * @type { number[] }
287   * @syscap SystemCapability.ArkUI.ArkUI.Full
288   * @since 9
289   * @form
290   */
291  /**
292   * Current data value. the max length is 9.
293   *
294   * @type { number[] }
295   * @syscap SystemCapability.ArkUI.ArkUI.Full
296   * @crossplatform
297   * @since 10
298   * @form
299   */
300  /**
301   * Current data value. the max length is 9.
302   *
303   * @type { number[] }
304   * @syscap SystemCapability.ArkUI.ArkUI.Full
305   * @crossplatform
306   * @atomicservice
307   * @since 11
308   * @form
309   */
310  values: number[];
311
312  /**
313   * Maximum value of the current data.
314   *
315   * @type { ?number }
316   * @syscap SystemCapability.ArkUI.ArkUI.Full
317   * @since 7
318   */
319  /**
320   * Maximum value of the current data.
321   *
322   * @type { ?number }
323   * @syscap SystemCapability.ArkUI.ArkUI.Full
324   * @since 9
325   * @form
326   */
327  /**
328   * Maximum value of the current data.
329   *
330   * @type { ?number }
331   * @syscap SystemCapability.ArkUI.ArkUI.Full
332   * @crossplatform
333   * @since 10
334   * @form
335   */
336  /**
337   * Maximum value of the current data.
338   *
339   * @type { ?number }
340   * @syscap SystemCapability.ArkUI.ArkUI.Full
341   * @crossplatform
342   * @atomicservice
343   * @since 11
344   * @form
345   */
346  max?: number;
347
348  /**
349   * DataPanel Type
350   *
351   * @type { ?DataPanelType }
352   * @syscap SystemCapability.ArkUI.ArkUI.Full
353   * @since 8
354   */
355  /**
356   * DataPanel Type
357   *
358   * @type { ?DataPanelType }
359   * @syscap SystemCapability.ArkUI.ArkUI.Full
360   * @since 9
361   * @form
362   */
363  /**
364   * DataPanel Type
365   *
366   * @type { ?DataPanelType }
367   * @syscap SystemCapability.ArkUI.ArkUI.Full
368   * @crossplatform
369   * @since 10
370   * @form
371   */
372  /**
373   * DataPanel Type
374   *
375   * @type { ?DataPanelType }
376   * @syscap SystemCapability.ArkUI.ArkUI.Full
377   * @crossplatform
378   * @atomicservice
379   * @since 11
380   * @form
381   */
382  type?: DataPanelType;
383}
384
385/**
386 * Defines the DataPanel component.
387 *
388 * @interface DataPanelInterface
389 * @syscap SystemCapability.ArkUI.ArkUI.Full
390 * @since 7
391 */
392/**
393 * Defines the DataPanel component.
394 *
395 * @interface DataPanelInterface
396 * @syscap SystemCapability.ArkUI.ArkUI.Full
397 * @since 9
398 * @form
399 */
400/**
401 * Defines the DataPanel component.
402 *
403 * @interface DataPanelInterface
404 * @syscap SystemCapability.ArkUI.ArkUI.Full
405 * @crossplatform
406 * @since 10
407 * @form
408 */
409/**
410 * Defines the DataPanel component.
411 *
412 * @interface DataPanelInterface
413 * @syscap SystemCapability.ArkUI.ArkUI.Full
414 * @crossplatform
415 * @atomicservice
416 * @since 11
417 * @form
418 */
419interface DataPanelInterface {
420  /**
421   * Return a DataPanel.
422   *
423   * @param { DataPanelOptions } options
424   * @returns { DataPanelAttribute }
425   * @syscap SystemCapability.ArkUI.ArkUI.Full
426   * @since 7
427   */
428  /**
429   * Return a DataPanel.
430   *
431   * @param { DataPanelOptions } options
432   * @returns { DataPanelAttribute }
433   * @syscap SystemCapability.ArkUI.ArkUI.Full
434   * @since 9
435   * @form
436   */
437  /**
438   * Return a DataPanel.
439   *
440   * @param { DataPanelOptions } options
441   * @returns { DataPanelAttribute }
442   * @syscap SystemCapability.ArkUI.ArkUI.Full
443   * @crossplatform
444   * @since 10
445   * @form
446   */
447  /**
448   * Return a DataPanel.
449   *
450   * @param { DataPanelOptions } options
451   * @returns { DataPanelAttribute }
452   * @syscap SystemCapability.ArkUI.ArkUI.Full
453   * @crossplatform
454   * @atomicservice
455   * @since 11
456   * @form
457   */
458  (options: DataPanelOptions): DataPanelAttribute;
459}
460
461/**
462 * Defines the DataPanel attribute functions.
463 *
464 * @extends CommonMethod
465 * @syscap SystemCapability.ArkUI.ArkUI.Full
466 * @since 7
467 */
468/**
469 * Defines the DataPanel attribute functions.
470 *
471 * @extends CommonMethod
472 * @syscap SystemCapability.ArkUI.ArkUI.Full
473 * @since 9
474 * @form
475 */
476/**
477 * Defines the DataPanel attribute functions.
478 *
479 * @extends CommonMethod
480 * @syscap SystemCapability.ArkUI.ArkUI.Full
481 * @crossplatform
482 * @since 10
483 * @form
484 */
485/**
486 * Defines the DataPanel attribute functions.
487 *
488 * @extends CommonMethod<DataPanelAttribute>
489 * @syscap SystemCapability.ArkUI.ArkUI.Full
490 * @crossplatform
491 * @atomicservice
492 * @since 11
493 * @form
494 */
495declare class DataPanelAttribute extends CommonMethod<DataPanelAttribute> {
496  /**
497   * Disable the special effect of the data ratio chart.
498   *
499   * @param { boolean } value
500   * @returns { DataPanelAttribute }
501   * @syscap SystemCapability.ArkUI.ArkUI.Full
502   * @since 7
503   */
504  /**
505   * Disable the special effect of the data ratio chart.
506   *
507   * @param { boolean } value
508   * @returns { DataPanelAttribute }
509   * @syscap SystemCapability.ArkUI.ArkUI.Full
510   * @since 9
511   * @form
512   */
513  /**
514   * Disable the special effect of the data ratio chart.
515   *
516   * @param { boolean } value
517   * @returns { DataPanelAttribute }
518   * @syscap SystemCapability.ArkUI.ArkUI.Full
519   * @crossplatform
520   * @since 10
521   * @form
522   */
523  /**
524   * Disable the special effect of the data ratio chart.
525   *
526   * @param { boolean } value
527   * @returns { DataPanelAttribute }
528   * @syscap SystemCapability.ArkUI.ArkUI.Full
529   * @crossplatform
530   * @atomicservice
531   * @since 11
532   * @form
533   */
534  closeEffect(value: boolean): DataPanelAttribute;
535
536  /**
537   * Set the value colors of the data ratio chart.
538   *
539   * @param { Array<ResourceColor | LinearGradient> } value - the value colors of the data ratio chart.
540   * @returns { DataPanelAttribute }
541   * @syscap SystemCapability.ArkUI.ArkUI.Full
542   * @crossplatform
543   * @since 10
544   */
545  /**
546   * Set the value colors of the data ratio chart.
547   *
548   * @param { Array<ResourceColor | LinearGradient> } value - the value colors of the data ratio chart.
549   * @returns { DataPanelAttribute }
550   * @syscap SystemCapability.ArkUI.ArkUI.Full
551   * @crossplatform
552   * @atomicservice
553   * @since 11
554   */
555  valueColors(value: Array<ResourceColor | LinearGradient>): DataPanelAttribute;
556
557  /**
558   * Set track background color of the data ratio chart.
559   *
560   * @param { ResourceColor } value - track background color of the data ratio chart.
561   * @returns { DataPanelAttribute }
562   * @syscap SystemCapability.ArkUI.ArkUI.Full
563   * @crossplatform
564   * @since 10
565   */
566  /**
567   * Set track background color of the data ratio chart.
568   *
569   * @param { ResourceColor } value - track background color of the data ratio chart.
570   * @returns { DataPanelAttribute }
571   * @syscap SystemCapability.ArkUI.ArkUI.Full
572   * @crossplatform
573   * @atomicservice
574   * @since 11
575   */
576  trackBackgroundColor(value: ResourceColor): DataPanelAttribute;
577
578  /**
579   * Set the stroke width of the data ratio chart.
580   *
581   * @param { Length } value - the stroke width of the data ratio chart.
582   * @returns { DataPanelAttribute }
583   * @syscap SystemCapability.ArkUI.ArkUI.Full
584   * @crossplatform
585   * @since 10
586   */
587  /**
588   * Set the stroke width of the data ratio chart.
589   *
590   * @param { Length } value - the stroke width of the data ratio chart.
591   * @returns { DataPanelAttribute }
592   * @syscap SystemCapability.ArkUI.ArkUI.Full
593   * @crossplatform
594   * @atomicservice
595   * @since 11
596   */
597  strokeWidth(value: Length): DataPanelAttribute;
598
599  /**
600   * Set the shadow width of the data ratio chart.
601   *
602   * @param { DataPanelShadowOptions } value - the track shadow width of the data ratio chart.
603   * @returns { DataPanelAttribute }
604   * @syscap SystemCapability.ArkUI.ArkUI.Full
605   * @crossplatform
606   * @since 10
607   */
608  /**
609   * Set the shadow width of the data ratio chart.
610   *
611   * @param { DataPanelShadowOptions } value - the track shadow width of the data ratio chart.
612   * @returns { DataPanelAttribute }
613   * @syscap SystemCapability.ArkUI.ArkUI.Full
614   * @crossplatform
615   * @atomicservice
616   * @since 11
617   */
618  trackShadow(value: DataPanelShadowOptions): DataPanelAttribute;
619}
620
621/**
622 * Defines DataPanel Component.
623 *
624 * @syscap SystemCapability.ArkUI.ArkUI.Full
625 * @since 7
626 */
627/**
628 * Defines DataPanel Component.
629 *
630 * @syscap SystemCapability.ArkUI.ArkUI.Full
631 * @since 9
632 * @form
633 */
634/**
635 * Defines DataPanel Component.
636 *
637 * @syscap SystemCapability.ArkUI.ArkUI.Full
638 * @crossplatform
639 * @since 10
640 * @form
641 */
642/**
643 * Defines DataPanel Component.
644 *
645 * @syscap SystemCapability.ArkUI.ArkUI.Full
646 * @crossplatform
647 * @atomicservice
648 * @since 11
649 * @form
650 */
651declare const DataPanel: DataPanelInterface
652
653/**
654 * Defines DataPanel Component instance.
655 *
656 * @syscap SystemCapability.ArkUI.ArkUI.Full
657 * @since 7
658 */
659/**
660 * Defines DataPanel Component instance.
661 *
662 * @syscap SystemCapability.ArkUI.ArkUI.Full
663 * @since 9
664 * @form
665 */
666/**
667 * Defines DataPanel Component instance.
668 *
669 * @syscap SystemCapability.ArkUI.ArkUI.Full
670 * @crossplatform
671 * @since 10
672 * @form
673 */
674/**
675 * Defines DataPanel Component instance.
676 *
677 * @syscap SystemCapability.ArkUI.ArkUI.Full
678 * @crossplatform
679 * @atomicservice
680 * @since 11
681 * @form
682 */
683declare const DataPanelInstance: DataPanelAttribute;
684