utils-echart
Version:
Echart component
456 lines (455 loc) • 11.8 kB
TypeScript
/** 饼图 */
export declare class Pie {
/**
* 获取饼图数据
* @param name 名称
* @param range 数据范围
* @returns arr
*/
static getPieData(name: string[], range?: number[]): {}[];
/**
* 饼图0
* @param data 数据
* @param colorArr 颜色组
* @returns option
*/
static pie0(data?: any, colorArr?: any[]): {
backgroundColor: any;
color: any;
title: any;
tooltip: {
trigger: string;
};
series: {
type: string;
radius: string;
center: string[];
label: any;
emphasis: {
scale: boolean;
};
data: any;
}[];
};
/**
* 饼图1
* @param data 数据
* @param colorArr 颜色组
* @returns option
*/
static pie1(data?: any, colorArr?: any[]): {
backgroundColor: any;
color: any;
tooltip: {
trigger: string;
};
legend: any;
series: {
type: string;
radius: string[];
roseType: string;
data: any;
labelLine: {};
label: {
show: boolean;
backgourndColor: string;
};
}[];
};
/**
* 饼图2
* @param data 数据 格式:[data1,data2,data3]
* @param colorArr 颜色组
* @param text 小标题 格式:[text1,text2,text3]
* @returns option
*/
static pie2(data?: any[], colorArr?: any[], text?: any[]): {
backgroundColor: any;
color: any;
grid: any;
legend: {
show: boolean;
};
tooltip: {
trigger: string;
};
title: {
subtext: any;
left: string;
top: string;
textAlign: string;
}[];
series: {
type: string;
center: string[];
radius: string;
data: any;
labelLine: {
length: number;
};
emphasis: {
scale: boolean;
};
}[];
};
/**
* 饼图3
* @param data 数据
* @param colorArr 颜色组
* @returns option
*/
static pie3(data?: any, colorArr?: any[]): {
backgroundColor: any;
color: any;
grid: any;
legend: {
type: string;
orient: string;
right: string;
top: string;
};
title: {
text: number;
subtext: string;
left: string;
top: string;
textStyle: {
fontSize: number;
fontWeight: string;
};
subtextStyle: {
fontSize: number;
fontWeight: string;
};
textAlign: string;
};
series: {
type: string;
radius: string[];
center: string[];
data: any;
label: any;
}[];
};
/**
* 饼图4
* @param data 数据
* @param colorArr 颜色组
* @param scaleColor 刻度颜色
* @returns option
*/
static pie4(data?: any, colorArr?: any[], scaleColor?: any): {
backgroundColor: any;
color: any;
grid: any;
title: {
text: number;
subtext: string;
left: string;
top: string;
textStyle: {
fontSize: number;
fontWeight: string;
};
subtextStyle: {
fontSize: number;
fontWeight: string;
};
textAlign: string;
};
series: ({
type: string;
radius: string[];
data: any;
label: {
show: boolean;
formatter: string;
rich: {
d: {
fontSize: number;
fontWeight: string;
};
b: {
fontSize: number;
height: number;
fontWeight: string;
};
};
position?: undefined;
};
labelLine: {
length: number;
};
emphasis?: undefined;
} | {
emphasis: {
scale: boolean;
};
type: string;
data: any[];
radius: string[];
label: {
position: string;
show: boolean;
formatter?: undefined;
rich?: undefined;
};
labelLine?: undefined;
})[];
};
/**
* 饼图5
* @param data 数据
* @param colorArr 颜色组
* @param total 进度总量
* @returns option
*/
static pie5(data?: any, colorArr?: any[], total?: number): {
backgroundColor: any;
grid: any;
legend: {
left: string;
top: string;
itemHeight: number;
itemGap: number;
};
series: any[];
};
/**
* 饼图6
* @param data 数据
* @param colorArr 颜色组
* @returns option
*/
static pie6(data?: any, colorArr?: any[]): {
backgroundColor: any;
color: any;
tooltip: {
trigger: string;
};
legend: any;
title: any;
series: {
name: string;
type: string;
radius: string[];
center: string[];
data: any;
label: {
show: boolean;
position: string;
};
labelLine: {
length: boolean;
};
emphasis: {
label: {
show: boolean;
fontSize: string;
fontWeight: string;
formatter: string;
};
};
itemStyle: {
borderRadius: number;
borderColor: string;
borderWidth: number;
};
}[];
};
/**
* 饼图7
* @param data 数据
* @param colorArr 颜色组
* @returns option
*/
static pie7(data?: any, colorArr?: any[]): {
backgroundColor: any;
color: any;
tooltip: {
trigger: string;
};
legend: any;
title: {
textAlign: string;
text: number;
subtext: string;
left: string;
top: string;
textStyle: {
fontSize: number;
fontWeight: string;
};
subtextStyle: {
fontSize: number;
fontWeight: string;
};
};
series: {
name: string;
type: string;
radius: string[];
center: string[];
data: any;
label: {
show: boolean;
};
labelLine: {};
itemStyle: {
borderRadius: number;
borderColor: string;
borderWidth: number;
};
}[];
};
/**
* 饼图8
* @param data 数据
* @param colorArr 颜色组
* @returns option
*/
static pie8(data?: any, colorArr?: any[]): {
backgroundColor: any;
color: any;
grid: any;
tooltip: {
trigger: string;
};
series: ({
name: string;
type: string;
data: any[];
radius: string[];
label: {
position: string;
show: boolean;
};
labelLine?: undefined;
emphasis?: undefined;
} | {
name: string;
type: string;
radius: string[];
labelLine: {
show: boolean;
};
label: {
show: boolean;
position: string;
};
data: any;
emphasis: {
label: {
show: boolean;
fontSize: string;
fontWeight: string;
formatter: string;
};
};
})[];
};
/**
* 饼图9
* @param data 数据
* @param colorArr 颜色组
* @returns option
*/
static pie9(data?: any, colorArr?: any[]): {
backgroundColor: any;
legend: any;
tooltip: {
trigger: string;
};
title: any;
series: ({
type: string;
radius: string[];
center: string[];
avoidLabelOverlap: boolean;
itemStyle: {
borderRadius: number;
borderColor: any;
borderWidth: number;
color: (p: any) => any;
};
label: {
show: boolean;
position: string;
};
labelLine: {
show: boolean;
};
data: any;
hoverAnimation?: undefined;
roseType?: undefined;
} | {
hoverAnimation: boolean;
type: string;
radius: string[];
center: string[];
roseType: string;
itemStyle: {
borderRadius: number;
color: string;
borderColor?: undefined;
borderWidth?: undefined;
};
label: {
show: boolean;
position?: undefined;
};
labelLine: {
show: boolean;
};
data: {
value: number;
name: string;
}[];
avoidLabelOverlap?: undefined;
})[];
};
/**
* 饼图10
* @param data 数据
* @param colorArr 颜色组
* @returns option
*/
static pie10(data?: any, colorArr?: any[]): {
backgroundColor: any;
series: ({
hoverAnimation: boolean;
type: string;
radius: string[];
itemStyle: {
borderRadius: number;
color: (p: any) => any;
borderColor?: undefined;
borderWidth?: undefined;
};
label: {
show: boolean;
};
labelLine: {
show: boolean;
};
data: any;
} | {
type: string;
radius: string[];
itemStyle: {
borderColor: any;
borderWidth: number;
color: (p: any) => string;
borderRadius?: undefined;
};
label: {
show: boolean;
};
labelLine: {
show: boolean;
};
data: any;
hoverAnimation?: undefined;
})[];
};
}