code cleanup
resize graph on window resize