9👍
I had a similar issue when destroying a chart and recreating it. My workaround was to get the scroll position before destruction and reapply it after creation. For example in jQuery:
var pos = $(document).scrollTop();
if (chart != undefined)
chart.destroy();
chart = new Chart(ctx, chartOptions);
$(document).scrollTop(pos);
- [Chartjs]-How to clear a chart from a canvas so that hover events cannot be triggered?
- [Chartjs]-Chart.js label color
Source:stackexchange.com