legend, click event added