I know that there is an option to have checkboxes next to the legend items in order to show/hide the corresponding chart series. I don't like the checkboxes (personal and client preference) so would like to be able to click on the legend text and markers in order to show/hide the series. Additionally, I can't seem to get the checkboxes to work, perhaps because of grouping.
Is this in any way possible?
I managed to use
event.target.textContent
to get the legend text that has been clicked on, and use that to show/hide the corresponding chart series.
However, this doesn't work when clicking on the legend marker.
Anyone able to go one step further?
Thanks