Add functionality for resizing graph canvas