2022-06-13 03:59:29 +00:00
|
|
|
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
|
|
|
|
import { PieCircleConfig } from './index'
|
|
|
|
import { CreateComponentType } from '@/packages/index.d'
|
|
|
|
|
2022-06-25 20:55:41 +08: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 publicConfig implements CreateComponentType {
|
|
|
|
public key: string = PieCircleConfig.key
|
|
|
|
|
|
|
|
public chartConfig = PieCircleConfig
|
|
|
|
|
|
|
|
// 图表配置项
|
|
|
|
public option = echartOptionProfixHandle(option, includes)
|
|
|
|
}
|