redrawing the charts when resizing the page