|
@@ -51,6 +51,7 @@ export function getPieOption({ data = [] as any[],
|
|
center = ['50%', '55%'],
|
|
center = ['50%', '55%'],
|
|
legend = { bottom: '5%', left: 'center', top: '0' } as any,
|
|
legend = { bottom: '5%', left: 'center', top: '0' } as any,
|
|
total = 0,
|
|
total = 0,
|
|
|
|
+ color = [] as string[],
|
|
centerText = '告警总数'
|
|
centerText = '告警总数'
|
|
}) {
|
|
}) {
|
|
return {
|
|
return {
|
|
@@ -65,7 +66,7 @@ export function getPieOption({ data = [] as any[],
|
|
itemWidth: getPx(20), itemHeight: 14,
|
|
itemWidth: getPx(20), itemHeight: 14,
|
|
...legend
|
|
...legend
|
|
},
|
|
},
|
|
- color: colors,
|
|
|
|
|
|
+ color: color.length ? color : colors,
|
|
series: [
|
|
series: [
|
|
{
|
|
{
|
|
name: '',
|
|
name: '',
|