echarts: Y-axis, type:'log' , series type :'bar', the first data value is 0, the bars on charts is not normal.
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'log'
},
series: [{
data: [0, 200, 150, 80, 70, 110, 130],
type: 'bar'
}]
};

About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 5
- Comments: 15 (3 by maintainers)
I disagree.
0is a valid integer which should not cause a charting library to break.@100pah any updates on this?
hello guyz, any update on this ? my data are dynamic and i cant replace the 0 with null or empty data because it’s a big difference in my case , (0 means no traffic and null means i fetched no data at this time), please if someone has a fix let me know
log(0)is-Infinity. So after removing0it will be OK. But it is needed to be think whether to trade0as an empty data.