Home Forums Chart Support Single legend heading for multiple charts in the same page

Single legend heading for multiple charts in the same page

Viewing 2 posts - 1 through 2 (of 2 total)
  • #25188

    Hello,

    I have an angular application that uses canvasjs licensed version, We have multiple charts in a single page. I need only one legend for the entire page instead of multiple legends for each graph. How is this possible.
    Also if the single legend is possible, i want it to behave the same. clicking on one legend should enable/disable data points of all the graphs.

    Thanks.

    #25192

    @msingh,

    Single legend to multiple charts is not available, as of now. However you can achieve the same by disabling legends for all the charts except the one at the bottom / last chart and handle hiding / unhiding of dataSeries of all charts from the shown legend. Please take a look at this JSFiddle for a demo. Same code works fine even in Angular, React and other frameworks.

    If this doesn’t fulfill your requirement, kindly share JSFiddle with your use-case with us, so that we can look into code, understand the scenario better and help you out.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.