Add server side data querying for aggregated charts