Answers for "Displaying JSON data in Chartjs"

0

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)'
      }]
   }
};
Posted by: Guest on September-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language