/* * 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. */ /** * @file * @kit ArkUI */ /*** if arkts 1.2 */ import { ResourceColor, Length } from './units' import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions } from './common' /*** endif */ /** * DataPanelType enum * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * DataPanelType enum * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * DataPanelType enum * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * DataPanelType enum * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare enum DataPanelType { /** * Line Type * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Line Type * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Line Type * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Line Type * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ Line, /** * Line Rainbow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Line Rainbow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Line Rainbow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Line Rainbow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ Circle, } /** * ColorStop type * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * ColorStop type * @typedef { object } ColorStop * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare interface ColorStop { /** * Color property. * @type { ResourceColor } color - the color value. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Color property. * @type { ResourceColor } color - the color value. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ color: ResourceColor; /** * Offset property. * @type { Length } offset - the color offset. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Offset property. * @type { Length } offset - the color offset. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ offset: Length; } /** * LinearGradient class * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * LinearGradient class * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare class LinearGradient { /** * Constructor. * * @param { ColorStop[] } colorStops - the LinearGradient constructor parameter. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Constructor. * * @param { ColorStop[] } colorStops - the LinearGradient constructor parameter. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ constructor(colorStops: ColorStop[]); } /** * Defines the options of Shadow. * * @extends MultiShadowOptions * @interface DataPanelShadowOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines the options of Shadow. * * @extends MultiShadowOptions * @interface DataPanelShadowOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare interface DataPanelShadowOptions extends MultiShadowOptions { /** * Current shadow colors. * * @type { ?Array } * @default Consistent with valueColors * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Current shadow colors. * * @type { ?Array } * @default Consistent with valueColors * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ colors?: Array; } /** * 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 * @form * @since 9 */ /** * Defines the options of DataPanel. * * @interface DataPanelOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines the options of DataPanel. * * @interface DataPanelOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ 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 * @form * @since 9 */ /** * Current data value. the max length is 9. * * @type { number[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Current data value. the max length is 9. * * @type { number[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ 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 * @form * @since 9 */ /** * Maximum value of the current data. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Maximum value of the current data. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ max?: number; /** * DataPanel Type * * @type { ?DataPanelType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * DataPanel Type * * @type { ?DataPanelType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * DataPanel Type * * @type { ?DataPanelType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * DataPanel Type * * @type { ?DataPanelType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ 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 * @form * @since 9 */ /** * Defines the DataPanel component. * * @interface DataPanelInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines the DataPanel component. * * @interface DataPanelInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ 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 * @form * @since 9 */ /** * Return a DataPanel. * * @param { DataPanelOptions } options * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Return a DataPanel. * * @param { DataPanelOptions } options * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ (options: DataPanelOptions): DataPanelAttribute; } /** * DataPanelConfiguration used by dataPanel content modifier * * @extends CommonConfiguration * @interface DataPanelConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ declare interface DataPanelConfiguration extends CommonConfiguration { /** * Current data value. the max length is 9. * * @type { number[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ values: number[]; /** * Maximum value of the current data. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ maxValue: number; } /** * 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 * @form * @since 9 */ /** * Defines the DataPanel attribute functions. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines the DataPanel attribute functions. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ 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 * @form * @since 9 */ /** * Disable the special effect of the data ratio chart. * * @param { boolean } value * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Disable the special effect of the data ratio chart. * * @param { boolean } value * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ 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 */ /** * 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 * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ 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 */ /** * 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 * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ 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 */ /** * 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 * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ 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 */ /** * 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 * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ trackShadow(value: DataPanelShadowOptions): DataPanelAttribute; /** * Set the content modifier of data panel. * * @param { ContentModifier } modifier - The content modifier of data panel. * @returns { DataPanelAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): DataPanelAttribute; } /** * Defines DataPanel Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines DataPanel Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines DataPanel Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines DataPanel Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare const DataPanel: DataPanelInterface /** * Defines DataPanel Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines DataPanel Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines DataPanel Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines DataPanel Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare const DataPanelInstance: DataPanelAttribute;