added methods to check whether if the graph is completely visible or not on resizing the window