How create Dynamic graph

0
I have an entity that contains data for the entire year with different attribute, but I need to allow for custom selection of specific months (e.g., 3, 5, or the entire year). The chart should display the sum of values for each selected month in a bar chart, and when hovering, it should show the sum. Currently, I am getting data for only one month, and when selecting a date range, I am not getting the aggregate sum. How can I retrieve the aggregated values for the selected date range?
asked
1 answers
0

To aggregate values for a selected date range in a bar chart, create a microflow that retrieves data using an XPath constraint ([TransactionDate >= $StartDate and TransactionDate <= $EndDate]). Loop through the results, group them by month, and sum the values using a List Aggregate action. Store the results in a Non-Persistent Entity (ChartData) with Month and TotalAmount. Return this list to the chart widget, setting the X-Axis as Month and Y-Axis as TotalAmount. Ensure the tooltip shows TotalAmount.

answered