UNPKG

@alicloud/cloud-charts

Version:

![](https://img.shields.io/npm/v/@alicloud/cloud-charts?color=%23ff8200)

54 lines (53 loc) 1.82 kB
import { Chart, Geometry, BaseChartConfig, ChartData, G2Dependents, Colors } from '../common/types'; import Base from '../common/Base'; import './index.scss'; import { TooltipConfig } from '../common/rectTooltip'; import { LegendConfig } from '../common/rectLegend'; import { LabelConfig } from '../common/label'; import { GeomStyleConfig } from '../common/geomStyle'; import { DecorationConfig } from '../common/circleAnnoation'; interface WpieConfig extends BaseChartConfig, DecorationConfig { colors?: Colors; legend?: LegendConfig | boolean; tooltip?: TooltipConfig | boolean; autoSort?: boolean; autoFormat?: boolean; cycle?: boolean; select?: boolean; innerRadius?: number; outerRadius?: number; /** * 用于极坐标,配置起始弧度。 */ startAngle?: number; /** * 用于极坐标,配置结束弧度。 */ endAngle?: number; label?: LabelConfig | boolean; selectData?: string; geomStyle?: GeomStyleConfig; /** 环形图中心的内容,仅当cycle=true时生效 */ innerContent?: { /** 标题,不指定则取数据中name */ title?: string; /** 数值,不指定则为数据总和 */ value?: number; /** 单位 */ unit?: string; }; } export declare class Pie extends Base<WpieConfig> { chartName: string; legendField: string; getDefaultConfig(): WpieConfig; totalData: number; sourceData: ChartData; changeData(chart: Chart, config: WpieConfig, data: ChartData): void; protected geom: Geometry; protected noDataShape: G2Dependents.IShape; isChangeEqual(objValue: any, othValue: any, key: string): boolean; init(chart: Chart, config: WpieConfig, data: any[]): void; } declare const Wpie: typeof Pie; export default Wpie;