I tested with this bar chart & also with OP's gist on my local.
Non-Zero Axis Min Value Issue
This is definitely a bug with the draw logic (identical issue but on extjs). Ignoring the change with maximum
value, which also adds further trouble to this issue, imagine we update the minimum
value of the bottom axis to n
, if the bar's original height on the drawn chart should've been h
, it will be reduced to h - n
(derived from h * (h-n)/h
).
For example;
here h ~= 1000
, and n = 500
, so as we see the invalid height of the drawn bars are 1000 - 500 = 500
, so 50%
length for bars...
here h ~= 1000
, and n = 750
, and 1000 - 750 = 250
, 25%
and with OP's example h ~= 1000
, and n = 995
, therefore we see extremely short 0.5%
length bars.
Sadly I am unable to fix this only through available methods to users, without accessing the terrible code in BarSeries
, and even doing so will be troublesome to maintain, not the best to modify a 3rd party non-open source code. I suggest creating a ticket to this company...
Out of Axis Range Data Issue
When the range of bottom axis reduced to [95-105]
, the behaviour gets erratic, bars stack up behind the x-axis.
So it seems when the data is out of range, this kinda bug occurs, there is no inherent hide/filter logic for dataset on the chart.
Axis Label Step Inconsistency Issue
This seems to be an issue with approximation of step calculation with default settings, which is 10 steps
(There is actually other logic, but unless some more custom settings have been used, it will be 10
). If you give a manual range, and if (max - min) % 10 != 0
, then you will have such issue due to approximation of step calculation.
For example, let's use [90-115]
, with max - min = 25
, and this creates the following issue;
and if you just do the math;
step = (max - min) / 10 = 25 / 10 = 2.5
value for labels;
- 90 + (2.5 x 0) = 90
- 90 + (2.5 x 1) = 92.5 ~= 93
- 90 + (2.5 x 2) = 95
- 90 + (2.5 x 3) = 97.5 ~= 98
- ...
So it is just the mismatch between range & default step amount. You can modulate this with maybe using a custom step amount with axis.setSteps()
on the bottom axis using a value that will divide the value max - min
evenly.