Skip to content
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

Maps: dataLabels placement when the shape loops around the world #18004

Closed
KacperMadej opened this issue Nov 21, 2022 · 0 comments · Fixed by #18795
Closed

Maps: dataLabels placement when the shape loops around the world #18004

KacperMadej opened this issue Nov 21, 2022 · 0 comments · Fixed by #18795

Comments

@KacperMadej
Copy link

Expected behaviour

Placement is to be based on the latitude and longitude corresponding to the center of the region on the map.
Get the lat/long out of the hc-middle-x/hc-middle-y and use that for the dataLabels instead of the current behavior.

Actual behaviour

Placement is based on the bounding box - which doesn't work well for some projections or projection options.

Live demo with steps to reproduce

Asia is wrong in the default demo - https://jsfiddle.net/gh/get/jquery/1.11.0/highslide-software/highcharts.com/tree/master/samples/mapdata/custom/world-continents

After some changes, see Europe, Asia in the wrong places - https://jsfiddle.net/BlackLabel/5w61mt4y/

Product version

Highcharts Maps v9.3+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants