Outside text relativebarmode confusing when bars disconnected
See original GitHub issueWith relative barmode and {textposition: 'outside'}
, outside text will smartly position the text of the first bar as ‘inside’. However, when there are two disconnected bars this results in the text of both bars being ‘inside’. This is not a problem when barmode has the default value.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Plotly.js in relative barmode labels are overlapped when both ...
Initial Thoughts. One solution is to specify the base parameter for each trace as 0 and for the negative bars use a negative...
Read more >Bar charts in Python - Plotly
With "relative" barmode, the bars are stacked on top of one another, with negative values below the axis, positive values above. In [31]:....
Read more >stacked (relative) bar chart: silly stacking order #1395 - GitHub
If I want to plot a stacked bar chart of mixed positive and negative values, say to recreate a likert plot, the order...
Read more >5.2 Bar chart - Statistique Canada
Horizontal bar charts. One disadvantage of vertical bar charts, however, is that they lack space for text labelling at the foot of each...
Read more >Clustered & Overlapped Bar Charts with Plotly Express
Clustered (Grouped) Bar Charts display numerical information about the relative proportion that exists between a main category and its ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great PR @eivindjahren - I’m always happy to see a one-line change in
src
backed up by 60 lines of tests!Possible, though the existing
'auto'
logic depends on the text size relative to the bar height, and ends up meaning “usually inside, but put it outside if we can and the bar is too small” - would be nice to clarify this behavior (for both'auto'
and'outside'
) in thetextposition
description though!@alexcjohnson I have made a work in progress PR on my fork (first PR here so needed to conform to the contribution guidelines). It should implement your proposed solution. I still want to test it out a bit more, but hopefully this is in the right direction.
Another solution is to have ‘outside’ always mean ‘outside’, if you want the smart behavior you use ‘auto’.