'Process and store data angular 13 [closed]

I'm working on angular 13 application where I need to show real time or past 24 hours data for different KPIs. The flow is when app loads, it fetch the data from backend and after that backend pushes the data to client through websockets/signalR.

The data come from backend in array form needs to be processed and then given to trend chart component that renders chart. After every 2 minutes, the whole data needs to process again and again and update the trend chart. The data may contain 500-2000 items and it takes time. I'm looking to store the data and when new data come I will process the only data which is not processed. What should I do for this case?

Should I use ngrx? Should I store in service? Any other solutions?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source