Remove any existing graph when a new line is selected