How can i trigger a click event on a specific line chart point from JavaScript ?

31 views
Skip to first unread message

Rafael B. Marcílio

unread,
May 5, 2018, 9:05:28 AM5/5/18
to jqplot-dev
I need to trigger a click event on a specific point via javascript

image

For example:


document.querySelector('.jqplot-event-canvas').clickAtPoint( 1 , 10);


its this possible or from another way?


Thanks

Rafael B. Marcílio

unread,
May 5, 2018, 10:07:32 AM5/5/18
to jqplot-dev
I can reproduce using  $('#chart').trigger('jqplotDataClick', [ null, seriesIndex, pointIndex ,plot.data[ pointIndex ] ]);

But the problem now, i'm using primefaces, and i cant access the ('#chart')

Probaly that's a primefaces issue, but that's the solution for anyone that needs to trigger a click at some chart point

thanks
Reply all
Reply to author
Forward
0 new messages