redraw graph on window resize