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

Text is cut off on bars where textposition=outside #2001

Closed
RedShift1 opened this issue Sep 13, 2017 · 6 comments
Closed

Text is cut off on bars where textposition=outside #2001

RedShift1 opened this issue Sep 13, 2017 · 6 comments

Comments

@RedShift1
Copy link

RedShift1 commented Sep 13, 2017

When drawing a bar plot with
{ textposition: outside }

the text of the highest values is sometimes cut off:

plotly_bars_text

JSFiddle: https://jsfiddle.net/vuqugx8v/

@alexcjohnson
Copy link
Collaborator

Yes, this is the same issue as #2000 - closing this one, we will make sure the fix handles both scatter and bar traces.

@babykick
Copy link

babykick commented Dec 5, 2017

Has the bug been Fixed or not yet? I recently use Dash to plot bar chart, the cut off problem still exists.

@dfaivre
Copy link

dfaivre commented Aug 6, 2019

In case some one stumbles across this, use the cliponaxis: false option (from the above referenced PR)

Example - CodePen

@pietersv
Copy link

pietersv commented Nov 12, 2021

I just ran into a case where setting cliponaxis: false just wouldn't work. One workaround is to explicitly set the yaxis range to [0,7000] but I think more direct is to set the top margin to 20px or something large enough to show the label

Set top margin to 20px
image

Set yaxis range a little wider:
image

@brandonerose
Copy link

for a bar chart the only thing that works for me is calculating the max value and multiplying the max by 1.1 to extend the range. Hope this gets fixed.

@brandonerose
Copy link

I found a useful workaround! If you add the label as an annotation instead of texposition outside it will not get cut off :)

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

No branches or pull requests

6 participants