UNPKG

@alicloud/cloud-charts

Version:

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

67 lines (66 loc) 1.99 kB
import { IBigData } from './bigData'; import { DataStructure } from './data'; import { EmptyDataProcess } from './emptyData'; /** 坐标系 */ export declare enum Coordinate { Cartesian = 0, Polar = 1, Others = 2 } export interface IChartRule { /** 图表id */ id: string; /** 图表名称 */ name: string; /** 将父类分成子类的函数,基础类型返回父类id,子类返回所属子类的id,未录入规则的子类返回空字符串 */ classify?: (data: any, config: any) => string; /** 坐标系类型 */ coord?: Coordinate; /** 主轴 */ mainAxis?: 'x' | 'y'; /** 数据结构 */ dataStructure?: DataStructure; /** 空数据处理类型 */ emptyData?: EmptyDataProcess; /** 大数据处理 */ bigData?: { /** 判断条件 */ judgements: IBigData[]; /** 大数据时的处理方式,返回config */ process?: (chartObj: any, data: any) => any; }; /** 极端数据处理,由于不同图表差异极大,此处用函数 */ extremeData?: (chartObj: any, config: any, data: any) => { isExtreme: boolean; config?: any; }; /** 子类 */ children?: Record<string, IChartRule>; /** 处理配置(前置) */ processConfig?: (config: any) => any; /** 处理数据 */ processData?: (data: any, config: any) => any; } declare const _default: { G2Bar: IChartRule; G2Line: IChartRule; G2Pie: IChartRule; G2Histogram: IChartRule; G2LineBar: IChartRule; G2LineScatter: IChartRule; G2Scatter: IChartRule; G2Nightingale: IChartRule; G2Radar: IChartRule; G2Funnel: IChartRule; G2MultiPie: IChartRule; G2Treemap: IChartRule; G2Hierarchy: IChartRule; G2Box: IChartRule; G2Wcandlestick: IChartRule; G2MultiCircle: IChartRule; G2Heatmap: IChartRule; G2Linebox: IChartRule; G2Rectangle: IChartRule; G2Sankey: IChartRule; }; export default _default;