charts.js json data code example
Example: Displaying JSON data in Chartjs
var data = jsonfile.jsonarray.map(function(e) {
return e.age;
});;
var ctx = canvas.getContext('2d');
var config = {
type: 'line',
data: {
labels: labels,
datasets: [{
label: 'Graph Line',
data: data,
backgroundColor: 'rgba(0, 119, 204, 0.3)'
}]
}
};