Skip to content

Plotly legends cutoff in Quarto Dashboards #4578

Open

Activity

  1. self-assigned this
    on Jul 11, 2024
  2. removed their assignment
    on Aug 2, 2024
  3. added
    P3
    bug
    on Aug 12, 2024
  4. xSardine commented on Jul 1, 2025

    @xSardine

    I investigated it a bit further, which I hope might help someone more competent than me with this code base to actually find the root issue and fix it :

    quarto-dev/quarto-cli#8612 (comment)

  5. gvwilson commented on Jul 2, 2025

    @gvwilson
    Contributor

    thanks @xSardine - really appreciate you digging in.

  6. added
    P1
    and removed
    P3
    on Jul 2, 2025
  7. astrowonk commented on Aug 7, 2025

    @astrowonk

    I also made an MRE repo, it happens (100% consistently for me) with quarto 1.7.33 and plotly 6.2.0 / 6.1.2 / 6.0.1 and any plotly figure with a legend in a dashboard. I see it on Firefox, Chrome, and Safari on MacOS. It persists through refresh.

    Here it's happening for me live on a dashboard on my website which is where I noticed it today when updating it.

    I've been making that dashboard on my site a few months and I'm pretty confident the truncation did not occur when I first set it up. (I remember moving the legends to the top left of the graphs, and would have noticed if they were truncated.) So, I had originally thought the issues was triggered by some combination of me upgrading plotly / quarto, but trying various older versions of plotly and/or quarto haven't changed anything. The oldest combo I tested was quarto 1.6.43 + plotly 5.24.

    And since this issue goes back to April 2024, and the quarto issue goes back to February, now I can't explain why I wasn't seeing this problem sooner.

    EDITED: Here is workaround via the quarto issue page, set some styles/ css, for example with YAML in the .qmd header like so:

    include-before-body: 
      text: |
        <style>
          .legend .scrollbox {
            clip-path: none !important;
            }
          g.legend rect.bg {fill-opacity: 0 !important;}
        </style>
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

    P1bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions