gauti
gauti

Reputation: 1274

Highchart min/max values doesn't set and chart not plotted properly

I am trying to plot the highchart with min,max limit and tickAmount. But when it plots the min and max values are not setting properly, instead the tick intervals are divided and some min/max values are set by highchart.

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>

<div  id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>

Example : http://jsfiddle.net/s2erv69n/

My requirements

Values can be positive or negative. 

Y axis should start at a certain value (the bottom of the axis):

Find the lowest value of all the 10 years and then round down the value to the nearest 1% (ex. -4.3% should be -5.0%).

This lowest value should be the starting point (bottom) of the Y axis (the first ticker of the Y axis).

Y axis should end at a certain value (the top of the axis): Find the highest value of all the 10 years and then round up the value to the nearest 1% (ex. 12.5% should be 13.0%).

This highest value should be the end point (top) of the Y axis (the last ticker of the Y axis).

There should always be 6 tickers (5 intervals) on the Y axis.

Clarifications

Please suggest me how to get the requirements done.

Upvotes: 1

Views: 592

Answers (1)

Mathankumar K
Mathankumar K

Reputation: 631

Add tickPositions in primary Yaxis and secondary Yaxis instead of tickAmount.

For Example : http://jsfiddle.net/g21uyyjs/

Upvotes: 1

Related Questions