• 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 * Defines the Gauge component.
18 *
19 * @interface GaugeInterface
20 * @syscap SystemCapability.ArkUI.ArkUI.Full
21 * @since 8
22 */
23/**
24 * Defines the Gauge component.
25 *
26 * @interface GaugeInterface
27 * @syscap SystemCapability.ArkUI.ArkUI.Full
28 * @since 9
29 * @form
30 */
31/**
32 * Defines the Gauge component.
33 *
34 * @interface GaugeInterface
35 * @syscap SystemCapability.ArkUI.ArkUI.Full
36 * @crossplatform
37 * @since 10
38 * @form
39 */
40interface GaugeInterface {
41  /**
42   * value:Current data value.
43   * min: Current Segment Minimum Value
44   * max: Current Segment Maximum Value
45   *
46   * @param { object } options
47   * @returns { GaugeAttribute }
48   * @syscap SystemCapability.ArkUI.ArkUI.Full
49   * @since 8
50   */
51  /**
52   * value:Current data value.
53   * min: Current Segment Minimum Value
54   * max: Current Segment Maximum Value
55   *
56   * @param { object } options
57   * @returns { GaugeAttribute }
58   * @syscap SystemCapability.ArkUI.ArkUI.Full
59   * @since 9
60   * @form
61   */
62  /**
63   * value:Current data value.
64   * min: Current Segment Minimum Value
65   * max: Current Segment Maximum Value
66   *
67   * @param { object } options
68   * @returns { GaugeAttribute }
69   * @syscap SystemCapability.ArkUI.ArkUI.Full
70   * @crossplatform
71   * @since 10
72   * @form
73   */
74  (options: { value: number; min?: number; max?: number }): GaugeAttribute;
75}
76
77/**
78 * @extends CommonMethod
79 * @syscap SystemCapability.ArkUI.ArkUI.Full
80 * @since 8
81 */
82/**
83 * @extends CommonMethod
84 * @syscap SystemCapability.ArkUI.ArkUI.Full
85 * @since 9
86 * @form
87 */
88/**
89 * @extends CommonMethod
90 * @syscap SystemCapability.ArkUI.ArkUI.Full
91 * @crossplatform
92 * @since 10
93 * @form
94 */
95declare class GaugeAttribute extends CommonMethod<GaugeAttribute> {
96  /**
97   * Sets the value for the current profile.
98   *
99   * @param { number } value
100   * @returns { GaugeAttribute }
101   * @syscap SystemCapability.ArkUI.ArkUI.Full
102   * @since 8
103   */
104  /**
105   * Sets the value for the current profile.
106   *
107   * @param { number } value
108   * @returns { GaugeAttribute }
109   * @syscap SystemCapability.ArkUI.ArkUI.Full
110   * @since 9
111   * @form
112   */
113  /**
114   * Sets the value for the current profile.
115   *
116   * @param { number } value
117   * @returns { GaugeAttribute }
118   * @syscap SystemCapability.ArkUI.ArkUI.Full
119   * @crossplatform
120   * @since 10
121   * @form
122   */
123  value(value: number): GaugeAttribute;
124
125  /**
126   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
127   *
128   * @param { number } angle
129   * @returns { GaugeAttribute }
130   * @syscap SystemCapability.ArkUI.ArkUI.Full
131   * @since 8
132   */
133  /**
134   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
135   *
136   * @param { number } angle
137   * @returns { GaugeAttribute }
138   * @syscap SystemCapability.ArkUI.ArkUI.Full
139   * @since 9
140   * @form
141   */
142  /**
143   * Set the start angle. Clock 0 is 0 degrees and clockwise is positive.
144   *
145   * @param { number } angle
146   * @returns { GaugeAttribute }
147   * @syscap SystemCapability.ArkUI.ArkUI.Full
148   * @crossplatform
149   * @since 10
150   * @form
151   */
152  startAngle(angle: number): GaugeAttribute;
153
154  /**
155   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
156   *
157   * @param { number } angle
158   * @returns { GaugeAttribute }
159   * @syscap SystemCapability.ArkUI.ArkUI.Full
160   * @since 8
161   */
162  /**
163   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
164   *
165   * @param { number } angle
166   * @returns { GaugeAttribute }
167   * @syscap SystemCapability.ArkUI.ArkUI.Full
168   * @since 9
169   * @form
170   */
171  /**
172   * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive.
173   *
174   * @param { number } angle
175   * @returns { GaugeAttribute }
176   * @syscap SystemCapability.ArkUI.ArkUI.Full
177   * @crossplatform
178   * @since 10
179   * @form
180   */
181  endAngle(angle: number): GaugeAttribute;
182
183  /**
184   * Set the color of the chart. You can set the solid color and segmented gradient color.
185   *
186   * @param { Array<any> } colors
187   * @returns { GaugeAttribute }
188   * @syscap SystemCapability.ArkUI.ArkUI.Full
189   * @since 8
190   */
191  /**
192   * Set the color of the chart. You can set the solid color and segmented gradient color.
193   *
194   * @param { Array<any> } colors
195   * @returns { GaugeAttribute }
196   * @syscap SystemCapability.ArkUI.ArkUI.Full
197   * @since 9
198   * @form
199   */
200  /**
201   * Set the color of the chart. You can set the solid color and segmented gradient color.
202   * @param { Array<[ResourceColor, number]> } colors - section colors of gauge drawing.
203   * @returns { GaugeAttribute } returns the instance of the GaugeAttribute.
204   * @syscap SystemCapability.ArkUI.ArkUI.Full
205   * @crossplatform
206   * @since 10
207   * @form
208   */
209  colors(colors: Array<[ResourceColor, number]>): GaugeAttribute;
210
211  /**
212   * Sets the thickness of the ring chart.
213   *
214   * @param { Length } length
215   * @returns { GaugeAttribute }
216   * @syscap SystemCapability.ArkUI.ArkUI.Full
217   * @since 8
218   */
219  /**
220   * Sets the thickness of the ring chart.
221   *
222   * @param { Length } length
223   * @returns { GaugeAttribute }
224   * @syscap SystemCapability.ArkUI.ArkUI.Full
225   * @since 9
226   * @form
227   */
228  /**
229   * Sets the thickness of the ring chart.
230   *
231   * @param { Length } length
232   * @returns { GaugeAttribute }
233   * @syscap SystemCapability.ArkUI.ArkUI.Full
234   * @crossplatform
235   * @since 10
236   * @form
237   */
238  strokeWidth(length: Length): GaugeAttribute;
239}
240
241/**
242 * Defines Gauge Component.
243 *
244 * @syscap SystemCapability.ArkUI.ArkUI.Full
245 * @since 8
246 */
247/**
248 * Defines Gauge Component.
249 *
250 * @syscap SystemCapability.ArkUI.ArkUI.Full
251 * @since 9
252 * @form
253 */
254/**
255 * Defines Gauge Component.
256 *
257 * @syscap SystemCapability.ArkUI.ArkUI.Full
258 * @crossplatform
259 * @since 10
260 * @form
261 */
262declare const Gauge: GaugeInterface;
263
264/**
265 * Defines Gauge Component instance.
266 *
267 * @syscap SystemCapability.ArkUI.ArkUI.Full
268 * @since 8
269 */
270/**
271 * Defines Gauge Component instance.
272 *
273 * @syscap SystemCapability.ArkUI.ArkUI.Full
274 * @since 9
275 * @form
276 */
277/**
278 * Defines Gauge Component instance.
279 *
280 * @syscap SystemCapability.ArkUI.ArkUI.Full
281 * @crossplatform
282 * @since 10
283 * @form
284 */
285declare const GaugeInstance: GaugeAttribute;
286
287