I am a beginner with amCharts5 and I am in need of assistance to retrieve the actual X value of the cursor on my chart (where the X axis represents dates). I have come across helpful examples for amCharts 4, but nothing seems to work for amCharts 5. Is this a basic requirement that is missing?
Alternatively, would you suggest using HighCharts or sticking with amCharts 4 instead?
This is what I have tried so far:
cursor.events.on("cursormoved", function(ev) {
console.log(ev);
console.log("x: ", ev.target.chart.xAxes.getIndex(0));
// not working : console.log("x: ", xAxis.positionToDate(xAxis.toAxisPosition(ev.target.xPosition)));
// not working : console.log("y: ", yAxis.positionToValue(yAxis.toAxisPosition(ev.target.yPosition)));
});
Here is a visual representation of my graph and cursor