admin管理员组文章数量:1415684
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 badges1 Answer
Reset to default 5If 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.
本文标签: javascriptHighcharts Getting average values for selection in line graphStack Overflow
版权声明:本文标题:javascript - Highcharts: Getting average values for selection in line graph - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745215709a2648153.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论