如何获得最后显示的值yAxis highcharts [英] how to get last value shown yAxis highcharts
问题描述
它应该是一个简单的标签,并显示最后一个点的值。
我希望知道是否可以将最后一个值放入yAxis的高位图中。
谢谢!
可能有几种方法。
我会用到的一个例子可以在这个例子中看到:
http://jsfiddle.net/jlbriggs/zXLZA/
data:[7, 12,16,32,{y:64,dataLabels:{enabled:true}}]
使用仅在最后一个数据点启用的数据标签。
缺点是您需要在数据中指定该数据标签。不难做到,但可能不适合您的需求。另一种方法是使用第二个y轴和tickPositions属性:
http://jsfiddle.net/jlbriggs/zXLZA/4/
I'm eager to find out if its possible to place last value in series to yAxis in highcharts.
It supposed to be simple label with last point value shown on the right side of the charts, dinamically chanhing when we add points to the chart.
thanks!
There are probably several methods. One that I would use can be seen in this example:
http://jsfiddle.net/jlbriggs/zXLZA/
data: [7,12,16,32,{y:64,dataLabels:{enabled:true}}]
This makes use of the datalabels, which are enabled only for the last data point.
The downside to this is that you need to specify that in your data. Not hard to do, but may not fit your needs.
Another way would be to use a second y axis, and the tickPositions property:
http://jsfiddle.net/jlbriggs/zXLZA/4/
这篇关于如何获得最后显示的值yAxis highcharts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!