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

alignmentgroup & offsetgroup restyle bug #6415

Open
archmoj opened this issue Dec 21, 2022 · 0 comments
Open

alignmentgroup & offsetgroup restyle bug #6415

archmoj opened this issue Dec 21, 2022 · 0 comments
Labels
bug something broken P3 backlog

Comments

@archmoj
Copy link
Contributor

archmoj commented Dec 21, 2022

    @archmoj this looks great! There's one piece I don't understand: if I load `zz-scatter-grouping-vs-defaults`, then clear all the `alignmentgroup` attrs - `Plotly.restyle(gd,'alignmentgroup',null)` - then the traces in the upper right subplot disappear. They also disappear if I set the `alignmentgroup` for just those two traces to `'bottom'` to match the ones below - `Plotly.restyle(gd,'alignmentgroup','bottom', [3,9])`.

If I also clear offsetgroup they come back, and if I set the offsetgroup for those two to something explicit they get their own group.

So I guess the odd case is when alignmentgroup is either all null or all the same but one trace, in a different subplot from the others, doesn't have an offsetgroup.

There's a related case that's clearly broken: in the same mock, if I just clear offsetgroup for the last trace it stays where it was. But if I first give it a new offsetgroup (so it correctly gets new space) and THEN clear it, it gets pushed into the next group!

Plotly.restyle(gd, 'offsetgroup', null, 11) // clear the group for the last trace, this is OK

Screenshot 2022-12-20 at 19 24 03

Plotly.restyle(gd, 'offsetgroup', '3', 11) // put it in a new group
Plotly.restyle(gd, 'offsetgroup', null, 11) // clear its group

Screenshot 2022-12-20 at 19 18 43

I don't think this is unique to scatter, I can get a similar history-dependent errors from bars from setting / clearing the offsetgroup of the FIRST bar in the bottom right subplot (ie replace the 11 with 4 in those commands). Maybe we just treat null as its own offsetgroup if there are other traces with an offsetgroup on the same axis?

Originally posted by @alexcjohnson in #6381 (comment)

@archmoj archmoj added the bug something broken label Dec 21, 2022
@gvwilson gvwilson self-assigned this Jul 4, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added the P3 backlog label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

2 participants