Introduce a service layer for returning chart data to the client.