programmer Report post Posted December 9, 2014 I am wondering if I can write JavaScript so that when the user clicks on the "seriesname" in a zoomline chart, if I can toggle between displaying certain values. I know how to write the JavaScript to show and hide elements... I just need to know how to recognize when the user clicks on the "seriesname" to call that function. Any help or links I may have overlooked is appreciated. Share this post Link to post Share on other sites
Moonmi Sonowal Report post Posted December 10, 2014 Hi, To identify the legend item ("seriesname") in legend you can make use of the legendItemClicked() in your chart. This event is fired when user clicks on individual legend items. By default, the legend items on a chart are configured to toggle the visibility of the dataset (series) that the legend item points to. Please refer the fiddle below for its implementation. http://jsfiddle.net/moonmi/mf3z433c/ Hope this would resolve your issue. Thanks. Share this post Link to post Share on other sites
programmer Report post Posted December 11, 2014 Thanks so much! Very helpful and I'm on my way. How can I tell if the legend item is active or not? For example, what I am doing is showing extra data when the user clicks on the legend item below the chart. If the item is active, I will set visibility to "visible" otherwise, I'll set visibility to "hidden". I can get the toggling working on click, but need to test against the legend item being on or off. Thanks, again!! Share this post Link to post Share on other sites
programmer Report post Posted December 11, 2014 Thank you for the information. I no longer need to access the legend items properties. Thank you for you help!! Share this post Link to post Share on other sites
Moonmi Sonowal Report post Posted December 12, 2014 You are welcome ! Do write back to us of you have any other queries. Share this post Link to post Share on other sites