Home forums Using CanvasJS How to add a "toggle on/of" button for all the series in a Legend

This topic contains 3 replies, has 2 voices, and was last updated by  Indranil Deo 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16075

    carlo
    Member

    Hi all,

    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!

    #16076

    carlo
    Member

    *update

    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!

    #16077

    carlo
    Member

    never mind found a solution

    #16082

    Indranil Deo
    Member

    carlo,

    Glad you figured it out.

    ___________
    Indranil Deo,
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.