Skip to content

Display hover text on top instead of to the right #381

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

Open
eugenesvk opened this issue Apr 1, 2016 · 7 comments
Open

Display hover text on top instead of to the right #381

eugenesvk opened this issue Apr 1, 2016 · 7 comments
Labels
community community contribution feature something new P3 backlog

Comments

@eugenesvk
Copy link

Hover labels in Plotly are displayed on the right hand side of the displayed object, for example:
plotlyhover

This makes the numbers misaligned, especially for e.g. bar charts, where you'd expect a label to be shown on top of the bar instead of to the right of the bar
plotlyhover2

Is there an option to make the labels appear on top instead? In my second example it would appear in the same position as my current annotations — right on top of the bar. In the first example it should appear on top of the bubble.

@etpinard
Copy link
Contributor

etpinard commented Apr 1, 2016

you'd expect a label to be shown on top of the bar instead of to the right of the bar

Can I you why you'd expect that, in all cases?

Is there an option to make the labels appear on top instead?

Not at the moment. But it would be a nice addition to the library.

@eugenesvk
Copy link
Author

Can I you why you'd expect that, in all cases?

Well, not in all cases, there are exceptions in space-constrained cases e.g. PowerPoint with think-cell (the best ppt addon for charts ever) labels are drawn to the side if there is not enough space inside/on top of the bar, e.g. bar segment is too small to fit a number (see here).
But in general it's convention (almost all the bar charts display bar values on top), ease of read when information is aligned (great hovertext highlighting partially negates this issue) and just a personal stylistic preference.

@mdtusz mdtusz added feature something new community community contribution labels Apr 20, 2016
@chamie
Copy link

chamie commented Aug 16, 2018

Can I you why you'd expect that, in all cases?

Because that way it won't overlap the bar to the right.

@gvwilson
Copy link
Contributor

gvwilson commented Jun 5, 2024

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

@gvwilson gvwilson closed this as completed Jun 5, 2024
@eugenesvk
Copy link
Author

Since nothing has changed this is still a concern, though I don't see the point in opening an identical issue for it to be "tidied up" later on when you can just as well add this issue back to the stack

@gvwilson gvwilson self-assigned this Jun 5, 2024
@gvwilson
Copy link
Contributor

gvwilson commented Jun 5, 2024

thanks @eugenesvk - I'll flag it as needing a sponsor and see if we can find someone from the community to work on it. Cheers - @gvwilson

@gvwilson gvwilson reopened this Jun 5, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added P3 backlog and removed ♥ NEEDS SPON$OR labels Aug 2, 2024
@archmoj
Copy link
Contributor

archmoj commented Jan 2, 2025

How about implementing layout.hoverlabel.position with following values?

'auto', 
'top left', 'top center', 'top right',
'middle left', 'middle center', 'middle right',
'bottom left', 'bottom center', 'bottom right',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution feature something new P3 backlog
Projects
None yet
Development

No branches or pull requests

6 participants