Added back the setCanvasSize function call to fix the recurring chart size bug.