Make graph grid update on window resize