nicolaskruchten / pivottable

Open-source Javascript Pivot Table (aka Pivot Grid, Pivot Chart, Cross-Tab) implementation with drag'n'drop.
https://pivottable.js.org/
MIT License
4.33k stars 1.07k forks source link

[NEW] moving average aggregator #1329

Open Domeshow opened 1 year ago

Domeshow commented 1 year ago

This is a new aggregator which gives the moving average as the values ​​are linked. It does not take empty cells into account. Let me explain. Since the moving average can be calculated for any period, this aggregator calculates the moving average over the previous periods. So the more the table increases, the more the period increases. This is in draft for two reasons:

  1. I still need ideas because I wonder if it should be done over a fixed period (of 3, 5,..)?
  2. The script should be in CoffeeScript as stated in the guideline but I'm having trouble converting this code to coffescript.
marclaporte commented 1 year ago

This is a good start!