Converts sample data for chart.js