graph updates when you click on a state