show/hide legend items does not work for stacked area chart
The standard show/hide lines when you click/double click on legend items breaks under certain circumstances for stacked charts.
- Go to https://codepen.io/plotly/pen/QEZvWJ
- Add property "stackgroup: 'one'" to each line (I also added an extra trace)
- Result:
- (Alternatively see https://codepen.io/sargonpiraev/pen/jOVzJYe)
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:
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
@Beth106 did you ever figure out how to deal with this?
@gvwilson any update on this? saw you picked it up 2 weeks ago
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 :-(
No I never fixed it, I ended up just turning off the show/hide functionality for my stacked charts so it didn't confuse anyone. Would definitely be useful to get a fix as high priority.
On Thu, 11 Jul 2024, 05:10 Kieran Lynn, @.***> wrote:
@Beth106 https://github.com/Beth106 did you ever figure out how to deal with this?
— Reply to this email directly, view it on GitHub https://github.com/plotly/plotly.js/issues/6138#issuecomment-2221984503, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKCGYIE5PS555CUO5G66Z7TZLYASJAVCNFSM6AAAAABKWENEBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRRHE4DINJQGM . You are receiving this because you were mentioned.Message ID: @.***>
Hello, did this issue ever get fixed, as I am also seeing it 2 years later using plotly 5.24.1
The issue has not been solved still. Using Plotly 6.0.1 and Dahs 3.0.0
Image from a Dash interface:
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
Any idea if a fix is planned for this issue please?
@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