Always recalculate tickDecimals and tickSize.
Resolves #1000. In Flot 0.7 we only calculated tickDecimals and tickSize once, when creating the tickGenerator for the first time. This meant that calls to setupGrid failed to recalculate the values, as reported in #860. #861 fixed the problem by moving calculation into tickGenerator, but this turned out to cause a new problem, since the function doesn't run when an explicit ticks array is provided. This commit solves both by always recalculating the values outside of the tickGenerator function. As far as I can tell the only reason it wasn't done this way from the beginning was to avoid unnecessary work in the case where tickGenerator is already provided in the options. But the extra work is negligible, and it's actually more consistent for the properties to always be set.
Showing
Please
register
or
sign in
to comment