displaying json data in chartjs

Solutions on MaxInterview for displaying json data in chartjs by the best coders in the world

showing results for - "displaying json data in chartjs"
Pietro
26 Sep 2020
1var data = jsonfile.jsonarray.map(function(e) {
2   return e.age;
3});;
4
5var ctx = canvas.getContext('2d');
6var config = {
7   type: 'line',
8   data: {
9      labels: labels,
10      datasets: [{
11         label: 'Graph Line',
12         data: data,
13         backgroundColor: 'rgba(0, 119, 204, 0.3)'
14      }]
15   }
16};