Update graph on click