Getting tooltip position and parameters.
Posted: Mon Jan 24, 2022 12:48 pm
Hi,
So what I'm trying to figure out is how I can get the exact position (x, y) and parameters (width, height) of the currently displayed tooltip.
Basically, when the user clicks on one of the columns I'm hiding the displayed tooltip and instead will show a different box of data with an absolute position.
So what I'm trying to figure out is how I can get the exact position (x, y) and parameters (width, height) of the currently displayed tooltip.
Code: Select all
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function (e) {
const data = {
plotX: this.tooltipPos[0],
plotY: this.tooltipPos[1],
x: this.category,
points: seriesData.map(sd => ({
series: { name: sd.name },
y: sd.data[this.x]
}))
}
setEvent(data)
}
}
}
}
}