fix for updating graphs on view resize

i was having some problems with the graph not updating after view resizing, this change fixes it