feat: 饼图类型新增可选

This commit is contained in:
蒋承
2022-09-26 11:17:00 +08:00
parent 18d83f161e
commit 39d9aa1896
3 changed files with 94 additions and 27 deletions
@@ -5,7 +5,20 @@ import dataJson from './data.json'
export const includes = ['legend']
export enum PieTypeEnum {
NORMAL = '常规图',
RING = '环形图',
ROSE = '玫瑰图'
}
export const PieTypeObject = {
[PieTypeEnum.NORMAL]: 'nomal',
[PieTypeEnum.RING]: 'ring',
[PieTypeEnum.ROSE]: 'rose'
}
const option = {
type: 'ring',
tooltip: {
show: true,
trigger: 'item'
@@ -19,6 +32,7 @@ const option = {
type: 'pie',
radius: ['40%', '65%'],
center: ['50%', '60%'],
roseType: false,
avoidLabelOverlap: false,
itemStyle: {
show: true,