javascript - Highcharts: Getting average values for selection in line graph - Stack Overflow

In a line mon chart: How can I get the average value of xAxis on selected elements?In the above exampl

In a line mon chart: /

How can I get the average value of xAxis on selected elements?

In the above example, I can only access to the min and max values of the graph but not the inbetweeen values nor the minimum point selected value.

So, if I have 1,2,3,4,5 and I select points from 2 to 4 I want to have an array with [2,3,4] with an average value of (2+3+4)/3.

Is there any way to get, at least, the index array of min and max xAxis values?

Thanks in advance.

In a line mon chart: http://jsfiddle/yuKwp/

How can I get the average value of xAxis on selected elements?

In the above example, I can only access to the min and max values of the graph but not the inbetweeen values nor the minimum point selected value.

So, if I have 1,2,3,4,5 and I select points from 2 to 4 I want to have an array with [2,3,4] with an average value of (2+3+4)/3.

Is there any way to get, at least, the index array of min and max xAxis values?

Thanks in advance.

Share Improve this question asked Sep 19, 2012 at 14:14 MaCMaC 5387 silver badges14 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

If you need to count average value of points that will be in plot after xAxis extremes will be set, check out this fiddle: http://jsfiddle/yuKwp/3/ (i.e. you select points from 2 to 4, but after setting extremes, in plot will be points from 1 to 5)

But if you want to only count point that selected by yourself, check this fiddle: http://jsfiddle/yuKwp/4/

Hope this helps, but if not, don't be afraid to ask me.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745215709a4617007.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信