Reputation: 421
how we can add click event to highchart from chart object that we get after the creation.
Why i need this is, need to a create re-usable function to create a chart. after creation of chart I need to trigger click event to show some data in lightbox.
is there anything like addSeries eg:
chart.addSeries({
data: [216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5]
});
for click?
chart.click(function(){})
Upvotes: 3
Views: 6942
Reputation: 8886
Hierarchy
#chart
-events
-click
Check out the Highcharts ref
Here is the jsFiddle Demo
Upvotes: 1
Reputation: 5575
Not sure if this is what you are looking for
Check .on
chart.on('click','serie selector',function(){code});
Upvotes: 1