fix: 雷达图空数据报错

This commit is contained in:
junjie 2021-08-31 12:41:51 +08:00
parent 8f055c016f
commit 41c5de5f9a

View File

@ -28,6 +28,9 @@ export function baseRadarOption(chart_option, chart) {
const maxValues = []
for (let i = 0; i < chart.data.series.length; i++) {
const y = chart.data.series[i]
if (y.data.length === 0) {
continue
}
// color
y.itemStyle = {
color: hexColorToRGBA(customAttr.color.colors[i % 9], customAttr.color.alpha)