仅基于可见数据的高度图移动平均数 [英] Highcharts moving average based on visible data only
问题描述
我根据上面的评论做了一个例子。
这个例子并没有计算移动平均数 - 为了简单起见,我写了一个简单的函数来计算整体平均值。
这个例子是演示如何在 legendItemClick
上使用它,仅使用可见的系列。
示例:
So, I have a price time series I wrote a moving average for the prices of different retailers http://i.imgur.com/dn3EdM6.png . So far so good, but I want to only see the moving average of the visible retailers. For example, here I have only one shop shown, but the moving average is calculated on all of them. http://i.imgur.com/ZpK5gsG.png Is it possible to make it to dynamically change? Maybe reload the graph or something?
I made an example based on my comment above.
This example does not calculate a moving average - I wrote a simple function to calculate the overall average for the sake of simplicity.
The purpose of the example is to demonstrate how to do it on legendItemClick
, making use of only the visible series.
Example:
这篇关于仅基于可见数据的高度图移动平均数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!