我怎样才能在高图上获得y轴的最大值? [英] How can I get the max value of a y axis at highcharts?

查看:155
本文介绍了我怎样才能在高图上获得y轴的最大值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能在highcharts上获得y轴的最大值?

http:/ /jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/line-basic/ 此处的最大值为 30 即可。如果您禁用纽约和东京,那么它就是 20 等等。

有什么想法?

chart 是您的图表变量


图表。 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;

demo

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.

Reference

这篇关于我怎样才能在高图上获得y轴的最大值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆