Reputation: 604
I'm trying to get the coordinates of the mouse click on the amcharts pie-chart's slice. It is working for the whole page except the slices. event.pageX and event.clientX are not working, returning undefined. I want the coordinates with respect to the page.
{
"event": "pullOutSlice",
"method": function (event) {
var relX = event.pageX;
var relY = event.pageY;
}
}
Upvotes: 1
Views: 549
Reputation: 5752
Is this what you are looking for ? https://jsfiddle.net/6w78zmo9/1/
Try this:
var relX = event.chart.mouseX;
var relY = event.chart.mouseY;
Upvotes: 3