0👍
You can use setInterval
method to execute the code which renders the chart with updated data.
var pollInterval = 15000; //change this value as needed
function renderChart() {
// put your existing code to render the chart here
}
$(function () {
window.setInterval(renderChart, pollInterval);
});
- Chartjs-Angular 8 and ng2 charts – Updating labels and data
- Chartjs-Can I arrange labels of legend in Doughnut chart one by one?
Source:stackexchange.com