remove graph as and when the graph data changes