You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Display hover text on top instead of to the right #381
Hover labels in Plotly are displayed on the right hand side of the displayed object, for example:
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
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.
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.
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
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
Activity
etpinard commentedon Apr 1, 2016
Can I you why you'd expect that, in all cases?
Not at the moment. But it would be a nice addition to the library.
eugenesvk commentedon Apr 1, 2016
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.
chamie commentedon Aug 16, 2018
Because that way it won't overlap the bar to the right.
gvwilson commentedon 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
eugenesvk commentedon Jun 5, 2024
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 commentedon 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
archmoj commentedon Jan 2, 2025
How about implementing
layout.hoverlabel.positionwith following values?