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.36k stars 1.08k forks source link

How can we use PivotTable.js for a moving average? #1186

Open marclaporte opened 4 years ago

marclaporte commented 4 years ago

I would like to do this: https://en.wikipedia.org/wiki/Moving_average

I will use for sales, expenses and time worked, and there are so many other potential uses! I'd like to see trends and reduce spikes.

I saw this thread, which is similar but not the same: https://github.com/nicolaskruchten/pivottable/issues/120

Any pointers? We would contribute any code needed for this. Just not sure where is best place to add it.

Thanks!

marclaporte commented 3 years ago

Some example code: https://github.com/kaelzhang/finmath#smoothed-moving-average-smadata-size-times

Example UI: https://github.com/rajasharan/moving-averages-chartjs

I have daily/weekly/monthly reports in Pivot Tables and it's hard to see trends with the spikes.

Thanks!

marclaporte commented 3 years ago

Related discussions: