/* * Copyright (c) 2021-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * DataPanelType enum * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * DataPanelType enum * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * DataPanelType enum * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare enum DataPanelType { /** * Line Type * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Line Type * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Line Type * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ Line, /** * Line Rainbow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Line Rainbow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Line Rainbow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ Circle, } /** * ColorStop type * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ declare type ColorStop = { /** * Color property. * @type { ResourceColor } color - the color value. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ color: ResourceColor; /** * Offset property. * @type { Length } offset - the color offset. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ offset: Length; } /** * LinearGradient class * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ declare class LinearGradient { /** * Constructor. * * @param { ColorStop[] } colorStops - the LinearGradient constructor parameter. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ constructor(colorStops: ColorStop[]); } /** * Defines the options of Shadow. * * @interface DataPanelShadowOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ declare interface DataPanelShadowOptions { /** * Current shadow radius. * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ radius?: number | Resource; /** * Current shadow colors. * * @type { ?Array } * @default Consistent with valueColors * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ colors?: Array; /** * Current shadow offsetX. * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ offsetX?: number | Resource; /** * Current shadow offsetY * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ offsetY?: number | Resource; } /** * Defines the options of DataPanel. * * @interface DataPanelOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines the options of DataPanel. * * @interface DataPanelOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Defines the options of DataPanel. * * @interface DataPanelOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare interface DataPanelOptions { /** * Current data value. the max length is 9. * * @type { number[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Current data value. the max length is 9. * * @type { number[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Current data value. the max length is 9. * * @type { number[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ values: number[]; /** * Maximum value of the current data. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Maximum value of the current data. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Maximum value of the current data. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ max?: number; /** * DataPanel Type * * @type { ?DataPanelType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * DataPanel Type * * @type { ?DataPanelType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * DataPanel Type * * @type { ?DataPanelType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ type?: DataPanelType; } /** * Defines the DataPanel component. * * @interface DataPanelInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines the DataPanel component. * * @interface DataPanelInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Defines the DataPanel component. * * @interface DataPanelInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ interface DataPanelInterface { /** * Return a DataPanel. * * @param { DataPanelOptions } options * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Return a DataPanel. * * @param { DataPanelOptions } options * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Return a DataPanel. * * @param { DataPanelOptions } options * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ (options: DataPanelOptions): DataPanelAttribute; } /** * Defines the DataPanel attribute functions. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines the DataPanel attribute functions. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Defines the DataPanel attribute functions. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare class DataPanelAttribute extends CommonMethod { /** * Disable the special effect of the data ratio chart. * * @param { boolean } value * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Disable the special effect of the data ratio chart. * * @param { boolean } value * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Disable the special effect of the data ratio chart. * * @param { boolean } value * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ closeEffect(value: boolean): DataPanelAttribute; /** * Set the value colors of the data ratio chart. * * @param { Array } value - the value colors of the data ratio chart. * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ valueColors(value: Array): DataPanelAttribute; /** * Set track background color of the data ratio chart. * * @param { ResourceColor } value - track background color of the data ratio chart. * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ trackBackgroundColor(value: ResourceColor): DataPanelAttribute; /** * Set the stroke width of the data ratio chart. * * @param { Length } value - the stroke width of the data ratio chart. * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ strokeWidth(value: Length): DataPanelAttribute; /** * Set the shadow width of the data ratio chart. * * @param { DataPanelShadowOptions } value - the track shadow width of the data ratio chart. * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ trackShadow(value: DataPanelShadowOptions): DataPanelAttribute; } /** * Defines DataPanel Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines DataPanel Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Defines DataPanel Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare const DataPanel: DataPanelInterface /** * Defines DataPanel Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines DataPanel Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Defines DataPanel Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare const DataPanelInstance: DataPanelAttribute;