Optimize the creation of filter sales overview charts by year with AnyChart
0
I have a list of orders in the database, and I want to create a chart to see an overview of sales by year. The orders table includes a creation date attribute, and the data spans many years. I created an additional table called "year filter" to record the unique values of the years. My current solution involves iterating through all the orders and then checking and initializing the price for each year filter object. However, this approach is inefficient when dealing with a large number of orders (over 100k records). Is there a way to optimize this? The utility used is AnyChart. Any feedback or ideas are appreciated.