我怎样才能在高图上获得y轴的最大值? [英] How can I get the max value of a y axis at highcharts?
问题描述
我怎样才能在highcharts上获得y轴的最大值?
即 http:/ /jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/line-basic/ 此处的最大值为 30 即可。如果您禁用纽约和东京,那么它就是 20 等等。
有什么想法?
图表。 yAxis [0] .max;
更新
@Anagio告诉我们可以通过以下方式获得它。
chart.yAxis [0] .getExtremes
通过这种方式,您可以获取数据值和刻度值。
数据值是系列中的值,而刻度值是图表行中的值。 p>
How can I get the max value of a y axis at highcharts?
i.e. http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/line-basic/ here max value is 30. If you disable New York and Tokyo it is 20 and so on.
Any ideas?
Assuming that chart
is your chart var.
chart.yAxis[0].max;
Update
@Anagio told that it's possible to get it the following way.
chart.yAxis[0].getExtremes
This way you can get the data values and the tick values.
The data values are the values from your series, while the tick values are the values from chart lines.
这篇关于我怎样才能在高图上获得y轴的最大值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!