Reputation: 263
I'm trying to tweak the graph so that the highest bar will always be at 100% However, there seems to be a slight padding which causes the graph to actually be a few percent lesser than what it ought to be.
Here's what I have so far: http://jsfiddle.net/MrDhG/
What I have tried to do is add the following to the y-axis:
y-axis:
...
endOnTick: false,
maxPadding: 0,
...
example: http://jsfiddle.net/MrDhG/1/
However, this sets the bars to go over and beyond the 100%. This is fine if, for example, the graph was from 0-150% and it stopped at 100%, but currently its behavior is slightly unpredictable.
Upvotes: 0
Views: 39
Reputation: 37578
You can get max version, and use tickPositioner to calculate intervals.
Simple example: http://jsfiddle.net/MrDhG/12/
tickPositioner:function(){
var min = 0,
tick = 0,
positions = [],
increment = Math.ceil((this.dataMax - this.dataMin) / 6);
for (min; tick<= this.dataMax; tick += increment) {
positions.push(tick);
}
return positions;
},
Upvotes: 1