Redraw chart if the window gets resized