
I am using Apex Chart's Distributed Column Chart
This is the data value I provided in series:
series: [{
data: [4, 1]
}],
From this data, I am expecting the labels on Y-axis to be rendered as 0, 1, 2, 3, 4 but that doesn't seem to happen. I tried putting the highest value to 5 in the data array and it rendered correctly.
So the problem here is that I am not able to handle the case when highest value is less than 5 as in the series above for [4, 1].
I tried formatter callback for labels where I used Math.floor() but that didn't work either as it displayed 0, 0, 1, 2, 3, 4
Thanks
I stumble upon the same issue. This solution fixed my problem tho
yaxis: {
labels: {
formatter: function(val) {
return Math.floor(val)
}
}
}
works fine.
Closing as duplicate of #779
Most helpful comment
works fine.
Closing as duplicate of #779