Seeking a way to update both datasets in my chart without having to destroy and recreate it.
chart2 = window.TrafficChart;
chart2.data.labels = data.timestamps;
console.log(data.traffic_tx);
chart2.data.datasets[0] = data.traffic_rx;
chart2.data.datasets[1] = data.traffic_tx; // facing an issue here
chart2.update();
Encountering difficulties when trying to set the second dataset
(chart2.data.datasets[1] = data.traffic_tx;)
, causing the update to fail and appear empty.
Moved on to searching for a solution over the past half hour...