lkurylo
lkurylo

Reputation: 1651

programmatically click on column in Highcharts

I have a simple drilldown chart: jsfiddle

Depending on the selected values in a table I need to dynamically click on specific column in this chart. How can I do that? I found how to click on the legend area, but not on column.

I tried to simply trigger a click event on the specific column, but in this way it not works:

$('rect:not(:first):nth-child(1):first').click()

I assume sth must be hidden in the charts api, but I can't see where it is.

Upvotes: 8

Views: 5089

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

You cna use built-in function for firing events: firePointEvent(type). See: http://jsfiddle.net/7xEhW/31/

For first column it is: chart.series[0].data[0].firePointEvent('click');

FirePointEvent is not part of docs, but it's used internally.

Upvotes: 19

Related Questions