Make graph automatically update