|
|
@@ -4,6 +4,8 @@ import React, { useEffect, useRef } from 'react'; |
|
|
import ConfigTitle from '../ConfigTitle'; |
|
|
import ConfigTitle from '../ConfigTitle'; |
|
|
import styles from './index.less'; |
|
|
import styles from './index.less'; |
|
|
|
|
|
|
|
|
|
|
|
const colors = ['#c73131', '#6ac21d', '#1664ff', '#f0864d', '#8a8a8a']; |
|
|
|
|
|
|
|
|
const color1 = new echarts.graphic.LinearGradient( |
|
|
const color1 = new echarts.graphic.LinearGradient( |
|
|
0, |
|
|
0, |
|
|
0, |
|
|
0, |
|
|
@@ -62,7 +64,7 @@ const color5 = new echarts.graphic.LinearGradient( |
|
|
false, |
|
|
false, |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
const color6 = new echarts.graphic.LinearGradient( |
|
|
|
|
|
|
|
|
const circleBgColor = new echarts.graphic.LinearGradient( |
|
|
0, |
|
|
0, |
|
|
0, |
|
|
0, |
|
|
0, |
|
|
0, |
|
|
@@ -130,16 +132,48 @@ function StatusChart({ chartData, style }: ExperimentChartProps) { |
|
|
itemGap: 20, |
|
|
itemGap: 20, |
|
|
height: 100, |
|
|
height: 100, |
|
|
}, |
|
|
}, |
|
|
color: [color1, color2, color3, color4, color5], |
|
|
|
|
|
|
|
|
color: colors, //[color1, color2, color3, color4, color5], |
|
|
series: [ |
|
|
series: [ |
|
|
{ |
|
|
{ |
|
|
type: 'pie', |
|
|
type: 'pie', |
|
|
radius: ['70%', '80%'], |
|
|
|
|
|
|
|
|
radius: '80%', |
|
|
|
|
|
center: ['30%', '50%'], |
|
|
|
|
|
avoidLabelOverlap: false, |
|
|
|
|
|
label: { |
|
|
|
|
|
show: false, |
|
|
|
|
|
}, |
|
|
|
|
|
tooltip: { |
|
|
|
|
|
show: false, |
|
|
|
|
|
}, |
|
|
|
|
|
emphasis: { |
|
|
|
|
|
label: { |
|
|
|
|
|
show: false, |
|
|
|
|
|
}, |
|
|
|
|
|
disabled: true, |
|
|
|
|
|
}, |
|
|
|
|
|
animation: false, |
|
|
|
|
|
labelLine: { |
|
|
|
|
|
show: false, |
|
|
|
|
|
}, |
|
|
|
|
|
data: [ |
|
|
|
|
|
{ |
|
|
|
|
|
value: 100, |
|
|
|
|
|
itemStyle: { |
|
|
|
|
|
color: circleBgColor, |
|
|
|
|
|
borderColor: 'rgba(22, 100, 255, 0.08)', |
|
|
|
|
|
borderWidth: 1, |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
type: 'pie', |
|
|
|
|
|
radius: ['50%', '70%'], |
|
|
center: ['30%', '50%'], |
|
|
center: ['30%', '50%'], |
|
|
avoidLabelOverlap: false, |
|
|
avoidLabelOverlap: false, |
|
|
padAngle: 3, |
|
|
padAngle: 3, |
|
|
itemStyle: { |
|
|
itemStyle: { |
|
|
borderRadius: 3, |
|
|
|
|
|
|
|
|
borderRadius: 0, |
|
|
}, |
|
|
}, |
|
|
minAngle: 5, |
|
|
minAngle: 5, |
|
|
label: { |
|
|
label: { |
|
|
@@ -163,7 +197,7 @@ function StatusChart({ chartData, style }: ExperimentChartProps) { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
type: 'pie', |
|
|
type: 'pie', |
|
|
radius: '60%', |
|
|
|
|
|
|
|
|
radius: '40%', |
|
|
center: ['30%', '50%'], |
|
|
center: ['30%', '50%'], |
|
|
avoidLabelOverlap: false, |
|
|
avoidLabelOverlap: false, |
|
|
label: { |
|
|
label: { |
|
|
@@ -185,7 +219,11 @@ function StatusChart({ chartData, style }: ExperimentChartProps) { |
|
|
data: [ |
|
|
data: [ |
|
|
{ |
|
|
{ |
|
|
value: 100, |
|
|
value: 100, |
|
|
itemStyle: { color: color6, borderColor: 'rgba(22, 100, 255, 0.08)', borderWidth: 1 }, |
|
|
|
|
|
|
|
|
itemStyle: { |
|
|
|
|
|
color: circleBgColor, |
|
|
|
|
|
borderColor: 'rgba(22, 100, 255, 0.08)', |
|
|
|
|
|
borderWidth: 1, |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
|