You must be logged in to post your query.
Home › Forums › Chart Support › legend checkbox
Hi,
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.
Thanks!
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!
@Jalian184,
You can trigger checked event with the help of jquery by subscribing to itemclick events.
Please refer these links. https://api.jquery.com/checked-selector/ http://stackoverflow.com/questions/7031226/jquery-checkbox-change-and-click-event http://stackoverflow.com/questions/8423217/jquery-checkbox-checked-state-changed-event
— Vishwas R Team CanvasJS
You must be logged in to reply to this topic. Login/Register