Home › forums › Using CanvasJS › Single legend heading for multiple charts in the same page
This topic contains 1 reply, has 2 voices, and was last updated by Vishwas R 6 months, 1 week ago.
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.
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.
You must be logged in to reply to this topic.