Redraw graph on window resize