alex 6c871b071f feat: PieCircle
新增饼图环形
2022-06-13 03:59:29 +00:00

70 lines
1.4 KiB
TypeScript

import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { PieCircleConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
export const includes = ['legend']
const option = {
tooltip: {
show: true,
trigger: 'item'
},
legend: {
show: true,
},
dataset: 0.25,
title: {
text: 25 + "%",
x: "center",
y: "center",
textStyle: {
color: "#56B9F8",
fontSize: 30
}
},
series: [
{
type: "pie",
radius: ["75%", "80%"],
center: ["50%", "50%"],
hoverAnimation: true,
color: ["#00bcd44a", "transparent"],
label: {
normal: {
show: false
}
},
data: [
{
value: [25],
itemStyle: {
normal: {
color: "#03a9f4",
shadowBlur: 10,
shadowColor:"#97e2f5"
}
}
},
{
value: [75],
itemStyle: {
normal: {
color: "#00bcd44a",
shadowBlur: 0,
shadowColor:"#00bcd44a"
}
}
}
]
}
]
}
export default class Config extends publicConfig implements CreateComponentType {
public key: string = PieCircleConfig.key
public chartConfig = PieCircleConfig
// 图表配置项
public option = echartOptionProfixHandle(option, includes)
}