Chartjs-How can I add multiple datasets into my dropdown menu and keep it as dynamic as it is right now?

0👍

First update your myData variable where newDataset contains your additional data:

myChart.config.data.datasets.push(newDataset);

Then call update() method to update your chart:

myChart.update();

Leave a comment