config.ts
1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { OverridePieCircleConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import cloneDeep from 'lodash/cloneDeep'
export const includes = []
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: {
        show: false
      },
      data: [
        {
          value: [25],
          itemStyle: {
            color: "#03a9f4",
            shadowBlur: 10,
            shadowColor:"#97e2f5"
          }
        },
        {
          value: [75],
          itemStyle: {
            color: "#00bcd44a",
            shadowBlur: 0,
            shadowColor:"#00bcd44a"
          }
        }
      ]
    },
  ]
}
export default class Config extends PublicConfigClass implements CreateComponentType {
  public key: string = OverridePieCircleConfig.key
  public chartConfig = cloneDeep(OverridePieCircleConfig)
  // 图表配置项
  public option = echartOptionProfixHandle(option, includes)
}