option = {
title: [
{
text: '0',
x: 'center',
top: '48%',
},
],
polar: {
radius: ['65%', '80%'],
center: ['50%', '50%'],
},
angleAxis: {
max: 100,
clockwise: true,
axisLine: {
show: true,
},
},
radiusAxis: {
type: 'category',
show: true,
},
series: [
{
name: '',
type: 'bar',
roundCap: true,
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)',
},
// 此处为0时异常,不为0 则是正常的
data: [0],
coordinateSystem: 'polar',
},
],
};
setInterval(function () {
option.series[0].data[0] = (Math.random() * 100).toFixed(2) - 0;
option.title[0].text = option.series[0].data[0];
myChart.setOption(option, true);
}, 2000);
Version
5.1.2
Steps to reproduce
1、config bar polar And series[0].data[0]=0
2、chage series[0].data[0]=any Number
What is expected?
Draw clockwise
What is actually happening?
Draw counterclockwise