Skip to content

show/hide legend items does not work for stacked area chart #6138

Description

@Beth106

The standard show/hide lines when you click/double click on legend items breaks under certain circumstances for stacked charts.

Bug replication:

  • Double click a legend item to isolate that line
  • Single click the same legend item to hide all lines
  • Double click any legend item to reshow all lines

Expected and actual result

  • Expected: Same image as we started with above
  • Actual Result: image

Bug replication

It gets even worse if you then:

  • Single click the original legend item to hide it
  • Single click the original legend item to show it again

Expected and actual result

  • Expected: Same image as we started with above
  • Actual Result
    image

Activity

  1. self-assigned this
    on Jun 26, 2024
  2. Kieran-Lynn commented on Jul 11, 2024

    @Kieran-Lynn

    @Beth106 did you ever figure out how to deal with this?

  3. Kieran-Lynn commented on Jul 11, 2024

    @Kieran-Lynn

    @gvwilson any update on this? saw you picked it up 2 weeks ago

  4. gvwilson commented on Jul 11, 2024

    @gvwilson
    Contributor

    Hi @Kieran-Lynn - I'm now managing the Libraries team at Plotly, so I've assigned this to myself for triage and assignment, but realistically it will be months before it gets to the top of our list - we have a lot of old issues to wade through :-(

  5. Beth106 commented on Jul 13, 2024

    @Beth106
    Author
  6. removed their assignment
    on Aug 2, 2024
  7. changed the title [-]BUG: Show/hide legend items does not work for stacked area chart[/-] [+]show/hide legend items does not work for stacked area chart[/+] on Aug 9, 2024
  8. bryandickman commented on Dec 21, 2024

    @bryandickman

    Hello, did this issue ever get fixed, as I am also seeing it 2 years later using plotly 5.24.1

  9. supernyv commented on Mar 22, 2025

    @supernyv

    The issue has not been solved still. Using Plotly 6.0.1 and Dahs 3.0.0
    Image from a Dash interface:
    Image

    However, when the image is downloaded using the "download" control on the graph, the issue is not there, which could mean that the problem is coming from the display functions (?) only

    Same image when downloaded
    Image

    Any idea if a fix is planned for this issue please?

  10. gvwilson commented on Mar 31, 2025

    @gvwilson
    Contributor

    @supernyv thanks for flagging this - it's in our backlog, but realistically it's going to be a while before we can get to it. If someone in the community can submit a PR, I can prioritize review. Thanks - @gvwilson

  11. emilykl commented on Aug 28, 2026

    @emilykl
    Contributor

    Fixed by #7668 and first released in plotly.js v3.4.0.

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

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions