Home › forums › Using CanvasJS › legend checkbox
This topic contains 2 replies, has 2 voices, and was last updated by Vishwas R 1 year, 7 months ago.
I was using Flot before canvasjs, before deciding to try canvasjs to fix performance issues with my chart (which has around 30k values sometimes). With Flot, I had a checkbox legend, so I was able to add more functionality to it. Since I had a second checkbox list separate from the graph, I made the two interact with each other – removing a line from the graph would uncheck the box in the other checkbox.
I need to be able to do this with canvasjs if I’m going to purchase it. I’m not sure how to do this currently if its even an option. I need to add a function call to the legend every time it is clicked, that either sends the label of that legend item, or I need to be able to loop through the entire legend to get a list of what is and isn’t checked. Is this possible? Inspecting the element hasn’t given me useful information.
I figured it out, but now I need to know if there is a way I can force/trigger a check of a specific item in the legend. Thanks!
You can trigger checked event with the help of jquery by subscribing to itemclick events. Please refer these links.
You must be logged in to reply to this topic.