-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Wrong tooltip position #239
Comments
are those native chart.js tooltips or custom ones? I cannot see where the tooltip is supposed to pointing at. |
not sure what I can do here. The tooltip position is computed by: chartjs-chart-geo/src/elements/GeoFeature.ts Lines 142 to 162 in 9aacf4a
i.e you can provide a center point in your data or it will compute the centroid fo the geo shape/feature. |
I can reproduce it in https://codepen.io/sgratzl/pen/gOaBQep but don't know yet what causes it |
@sgratzl I was able to reproduce this reliably by opening dev tools docked to the right or left side of the window, then closing. after closing is when i would see some tooltips be offset. if i reopen devtools, it goes back into place. my thoughts is that there's a window resize in this case that's not triggering recalculations of the canvas |
When I try to load page or change the window size where the map presents and try to hover some country, tooltip displays in wrong position.
To Reproduce
Expected behavior
Tooltip should be displayed near the country
Screenshots
Context
Additional context
List of countries from: https://unpkg.com/world-atlas/countries-50m.json
Configuretion:
The text was updated successfully, but these errors were encountered: