test legend on click