test legend on click fix