Convert JSON to chart data