added click and hover for legend