add legend control