简体   繁体   中英

Make Highcharts' setExtremes off tick with two yAxis

I need to set minimum and maximum of yAxis of a Highcharts' chart. And I do NOT want the minimum and maximum to round to the ticks.

Highcharts documentation offers an example, which works great:

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/members/axis-setextremes-off-ticks/

var chart = $('#container').highcharts(),
    yAxis = chart.yAxis[0];

    yAxis.options.startOnTick = false;
    yAxis.options.endOnTick = false;

    chart.yAxis[0].setExtremes(40, 210);

But when I do it with two y-axis, it doesn't work:

http://jsfiddle.net/4kLyf04a/

The minimum and maximum that chart uses are not what I set in the code. Anyone knows why?

alignTicks参数设置为false。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM