Purpose
This function combines the output of the previous two functions into a single JSON object with two keys:
-
items: Contains the summary. -
chart: Contains the line chart data.