8

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.

4

1 回答 1

19

您可以使用内置函数来触发事件:firePointEvent(type). 见:http: //jsfiddle.net/7xEhW/31/

对于第一列,它是:chart.series[0].data[0].firePointEvent('click');

FirePointEvent 不是文档的一部分,但在内部使用。

于 2013-07-10T12:39:36.753 回答