make the graph area resizable and redraw the graph if the area or the window is resized.