Home › forums › Using CanvasJS › How to add a "toggle on/of" button for all the series in a Legend
Tagged: legend toggle on/off data series line chart sidplay
This topic contains 3 replies, has 2 voices, and was last updated by Indranil Deo 1 year, 6 months ago.
I’ve successfully made a line chart with 20+ factors all displaying a series of data going back 5 years. When the page loads, by default, all the series are displayed. I wish to have some sort of button so the user can toggle everything off and toggle on the legend they wish to see. I’m looking for an alternative because as of the moment, I have to click all the legends one by one to disable them.
Any help/advice will be appreciated. Thanks in advance!
another valid option is that all the factors’ visibility are set to “off” by default except for maybe 1 or 2 factors so the chart isn’t as clogged. Thanks!
never mind found a solution
Glad you figured it out.
You must be logged in to reply to this topic.