66 lines
1.3 KiB
TypeScript
Raw Normal View History

import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
2022-06-13 03:59:29 +00:00
import { PieCircleConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import cloneDeep from 'lodash/cloneDeep'
2022-06-13 03:59:29 +00:00
export const includes = []
2022-06-13 03:59:29 +00:00
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: {
2022-06-13 13:05:41 +08:00
show: false
2022-06-13 03:59:29 +00:00
},
data: [
{
value: [25],
itemStyle: {
2022-06-13 13:05:41 +08:00
color: "#03a9f4",
shadowBlur: 10,
shadowColor:"#97e2f5"
2022-06-13 03:59:29 +00:00
}
},
{
value: [75],
itemStyle: {
2022-06-13 13:05:41 +08:00
color: "#00bcd44a",
shadowBlur: 0,
shadowColor:"#00bcd44a"
2022-06-13 03:59:29 +00:00
}
}
]
2022-06-13 13:05:41 +08:00
},
2022-06-13 03:59:29 +00:00
]
}
export default class Config extends PublicConfigClass implements CreateComponentType {
2022-06-13 03:59:29 +00:00
public key: string = PieCircleConfig.key
public chartConfig = cloneDeep(PieCircleConfig)
2022-06-13 03:59:29 +00:00
// 图表配置项
public option = echartOptionProfixHandle(option, includes)
}