In Ext JS there is a chained store that allows us to sit on top of an existing store and perform grouping, filtering and sorting of the underlying store without affecting the actual data in the store.
Is there some way we could do something similar but provide a function that would aggregate the data in the store, which could then be used by another component to view the aggregation?
For example, lets say I have a store that has a collection of objects with a date and a value. I have a grid that shows every item in that store. But I want to have another component that shows the data aggregated by day. So I want to take that raw data and collect all items that have the same date and sum the values.
I know that grids have grouping summary options, but I don't want all of the data to appear in the grid alongside the summary, just the grouping summary.
One component looks like:
|Date |Value|
|1/1/18|1 |
|1/1/18|5 |
|2/1/18|1 |
...
The other:
|1/1/18|2/1/18|etc.|
|6 |1 |etc.|