chart.js receives a json that decribes a graph