hide and show the graph