I am trying to set max value dynamically of the largest number. I am not sure, where I am doing wrong...
Any help please?
Online Demo
It is possible to use tockPositioner
and set ticks there like:
showLastLabel: false,
tickPositioner: function(min, max) {
var ticks = [],
tick = min,
step = Math.round((max - min) / 7);
while (tick < max - step / 2) {
ticks.push(Math.round(tick));
tick += step;
}
ticks.push(Math.round(max));
ticks.push(Math.round(max+step)); //hidden - added for top padding
return ticks;
}
Example: http://jsfiddle.net/e6har510/