echarts
echarts copied to clipboard
雷达图 radar rich 无效
One-line summary [问题简述]
雷达图 radar rich 无效
使用svg渲染情况下无效,canvas是正常的
var myChart = echarts.init(document.querySelector('#main'), null, {renderer: 'svg'});
Version & Environment [版本及环境]
- ECharts version [4.x、3.8.5都不行]:
- Browser version [Chrome v69]:
- OS Version [操作系统类型和版本]:
Expected behaviour [期望结果]
ECharts option [ECharts配置项]
let option = {
backgroundColor: "#FFF",
radar: {
center: ['50%', '58%'],
nameGap: 6, // 指示器名称和指示器轴的距离。
name: {
textStyle: {
color: '#999',
},
formatter: function(name, indicator) {
return [
'{title|' + name + '}',
'{value|' + indicator.value + indicator.label + '}',
].join('\n')
},
rich: {
title: {
color: '#9b9da4',
align: 'center',
fontSize: '12',
},
value: {
color: '#6082f2',
fontSize: '12',
padding: [0, 0, 5, 0],
textAlign: 'center',
align: 'center',
fontWeight: 'bolder',
},
}
},
splitArea: {
areaStyle: {
color: ['#fff', '#fff', '#fff', '#fff'],
shadowColor: 'rgba(0, 100, 0, 0.3)'
}
},
axisLine: {
lineStyle: {
color: '#d9dadc'
}
},
splitLine: {
lineStyle: {
color: '#d9dadc',
}
},
indicator: indicator_data || [
{ name: this.$t('基本面'), max: 6500, value: 500 },
{ name: 'B', max: 6500, value: 3400 },
{ name: 'C', max: 3800, value: 2800 },
{ name: 'D', max: 3800, value: 3100 },
{ name: 'E', max: 5200, value: 4200 }
]
},
series: [{
type: 'radar',
data: [{
value: series_value,
name: 'DATA',
itemStyle: {
normal: {
color: '#729ff0'
}
},
lineStyle: {
normal: {
width: '1.3'
}
},
areaStyle: {
normal: {
color: 'rgba(114, 159, 240, 0.5)'
}
}
}]
}]
}