Chartjs-Chartjs, How to edit data option after creating a chart?

1👍

Should work with .update().

myLineChart.data.datasets[0].pointRadius = 5;
myLineChart.update()

Refer to documentation

1👍

Yes, this is possible
You have to merge the new field into your data object

You can achieve this by doing :

// first chart
var myLineChart = Chart.Line(mycanvas,{
  data:data
})
// second chart
var newData = data;
newData.datasets[0].pointRadius = 5;
var myLineChart2 = Chart.line(mycanvas2,{
  data:newData
})

Leave a comment