method to hide and show nodes and links in graph