UNPKG

@alicloud/cloud-charts

Version:

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

132 lines (131 loc) 2.91 kB
import { DataStructure } from './data'; /** 空数据处理的三种类型 */ export declare enum EmptyDataProcess { Axis = 0, Polar = 1, Background = 2 } /** 根据数据量判断是否是空数据 */ export declare function isEmptyData(dataSize: number): boolean; /** 根据空数据处理类型、数据结构类型进行空数据处理,个别图表需要特殊处理 */ export declare function processEmptyData(emptyType: EmptyDataProcess, dataType: DataStructure, chartName: string): { data: any[]; config: { xAxis: { min: number; max: number; label: boolean; }; yAxis: { min: number; max: number; label: boolean; }; padding: number; legend?: undefined; tooltip?: undefined; colors?: undefined; label?: undefined; }; } | { data: { x: string; y: number; }[]; config: { xAxis: { label: boolean; min?: undefined; max?: undefined; }; yAxis: { min: number; max: number; label: boolean; }; legend: boolean; tooltip: boolean; colors: string; padding?: undefined; label?: undefined; }; } | { data: { x: string; y: number; }[]; config: { legend: boolean; tooltip: boolean; colors: string; label: boolean; xAxis?: undefined; yAxis?: undefined; padding?: undefined; }; } | { data: { children: { name: string; value: number; }[]; name?: undefined; nodes?: undefined; links?: undefined; }; config: { legend: boolean; tooltip: boolean; colors: string; label: boolean; xAxis?: undefined; yAxis?: undefined; padding?: undefined; }; } | { data: { x: number; y: number; }[]; config: { padding: number; xAxis: boolean; yAxis: boolean; tooltip: boolean; legend: boolean; colors?: undefined; label?: undefined; }; } | { data: { name: string; children: any[]; nodes?: undefined; links?: undefined; }; config: { padding: number; xAxis: boolean; yAxis: boolean; tooltip: boolean; legend: boolean; colors: string; label?: undefined; }; } | { data: { nodes: any[]; links: any[]; children?: undefined; name?: undefined; }; config: { padding: number; xAxis: boolean; yAxis: boolean; tooltip: boolean; legend: boolean; colors?: undefined; label?: undefined; }; };