Skip to content

choropleth hover labels can get lost #1333

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

Closed
alexcjohnson opened this issue Jan 25, 2017 · 1 comment · Fixed by #1401
Closed

choropleth hover labels can get lost #1333

alexcjohnson opened this issue Jan 25, 2017 · 1 comment · Fixed by #1401
Assignees
Labels
bug something broken

Comments

@alexcjohnson
Copy link
Collaborator

If you zoom into a choropleth (say for example http://localhost:3000/devtools/test_dashboard/#geo_country-names) and hover on a region that goes off the edge, the hover label can get lost. Here's one where you just see the bottom of the Russia label (and if I zoom in a little more it disappears entirely):
screen shot 2017-01-25 at 9 14 01 am

The label should get pushed down onto the plot, like we do with regular cartesian types:
screen shot 2017-01-25 at 9 22 14 am

One thing that may help a bit: the hover labels don't need to be clipped to the same viewport as the plot: the tip of the arrow should be constrained to that viewport, but the rest of the label can go outside (as long as the whole thing stays withingd)

@alexcjohnson alexcjohnson added the bug something broken label Jan 25, 2017
@etpinard
Copy link
Contributor

the hover labels don't need to be clipped to the same viewport as the plot

Yeah. That would be a nice improvement to start. Choropleth hover labels should be drawn in the <g infolayer> node. While at it, we should 🔪 that useless <div geo-container>:

image

and put the geo nodes in the main <svg>.


Down the road, to better handle edge cases, we should consider extending the hoveron: 'fill' hover placement algo to geo polygons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants