2π
β
ability to click and hover over on each Bar
Unfortunately, bars donβt have a pointHitDetectionRadius equivalent. But you can override the inRange function for Chart.Rectangle to give a little more vertical detection range.
Chart.Rectangle.prototype.inRange = function (chartX, chartY) {
return (chartX >= this.x - this.width / 2 && chartX <= this.x + this.width / 2) && (chartY >= this.y && chartY <= (this.base + 5));
};
Iβve extended the vertical area 5 units downward from the x axis, but you could change it to above the axis as well (just subtract it from this.y)
Fiddle β https://jsfiddle.net/etLfr9ka/
Please all ideas how to display them on one chart
As long as you donβt set barShowStroke to false you would see a stroke for even 0 values.
The alternative would be pick a framework that supports logarithmic scales or one that allows you to split the y scale into sections β however IMO this would be a bad idea.
Source:stackexchange.com