-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get clicked country name? #243
Comments
Bump. |
I found ugly AF solution new MutationObserver(() => {
const countryTooltip = document.getElementsByClassName('amcharts-balloon-div').item(0);
if (countryTooltip) {
console.log('countryTooltip', countryTooltip.textContent)
return;
}
}).observe(document, {
childList: true,
subtree: true
}); |
Bump. Do you have better one? |
Heeeeeeeeey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, as in the title,
which event I can use?
ClickEvent does not provide that information,
clickMapObjectEvent does not work.
Hacks like
document.elementFromPoint(e.chart.mouseX, e.chart.mouseY).getAttribute('aria-label')
are pointing to wrong places, propably cuz of margins, paddings etc.
The text was updated successfully, but these errors were encountered: