add legend depends on the overlay selection