this.$el is a VueJS specific thing. I think I have nailed some of it now, it currently don't understand when I resize the container, only the window, but ChartJS is f* bugged in this responsive thing. I used the .destroy() but it had leftover junk I had to remove manually.
this.chart.destroy();
this.$el.childNodes[0].nextSibling.removeAttribute('width');
this.$el.childNodes[0].nextSibling.removeAttribute('height');
this.$el.childNodes[0].nextSibling.removeAttribute('style');
if (this.timeoutHandle)
window.clearTimeout(this.timeoutHandle);
this.timeoutHandle = window.setTimeout(this.draw, 250);
this.$el.childNodes[0].nextSibling is a reference to the canvas
Steffen Cope
Indelible Web.
jQuery:
$(window).resize( function(){ DrawingClass.redraw(); });No JQuery
window.onresize = function(event) { // :) DrawingClass.redraw(); };