Skip to content

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

Closed

Description

@RedShift1

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/

Activity

  1. alexcjohnson commented on Sep 13, 2017

    @alexcjohnson
    Collaborator

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

  2. babykick commented on Dec 5, 2017

    @babykick

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

  3. dfaivre commented on Aug 6, 2019

    @dfaivre

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

    Example - CodePen

  4. protobi-pieter commented on Nov 12, 2021

    @protobi-pieter

    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

  5. brandonerose commented on Nov 29, 2021

    @brandonerose

    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.

  6. brandonerose commented on Nov 29, 2021

    @brandonerose

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

  7. changed the title [-]Text is cut off on bars where textposition=outside[/-] [+][BUG] Text is cut off on bars where textposition=outside[/+] on Sep 15, 2025
  8. emilykl commented on Sep 15, 2025

    @emilykl
    Contributor

    special case of #2000

  9. emilykl commented on Dec 17, 2025

    @emilykl
    Contributor

    Reopening this one as it best captures the specific issue addressed by #7675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions