Thanks. I have tried something similar, with Vue:
In ready():
window.addEventListener('resize', this.redraw);
redraw() {
console.log('redrawing..');
this.chart.destroy();
this.chart = new Chart(
this.$el.getContext('2d'),
{
type: this.type,
data: this.data,
maintainAspectRatio: false,
options: {
legend: {
position: 'bottom'
}
}
}
);
}
But that doesn't seem to work.. I don't know if I'm missing some key part completely because I haven't been able to find a solution for days.