Closed eswizardry closed 4 years ago
Sorry just look the code in Chart.qml and found event is injected by bindEvents. So I can get the index of the point when click by below code
onClicked: {
var element = jsChart.getElementsAtEvent(event.mouseEvent)
console.debug(element[0]._index)
}
Sorry for make noise here :)
No worries, make all the noise you want :) You were faster in getting the solution that I was in answering, though. Hope, you get some nice results with our adaptor! Cheers, Michael
I would like to get element data when clicking on the point. I have a handler to get the data in the option like below:
Do you have any suggestions on how to get index or data when clicking on the point?