Working graph on click