`alignmentgroup` & `offsetgroup` restyle bug
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
@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
Plotly.restyle(gd, 'offsetgroup', '3', 11) // put it in a new group
Plotly.restyle(gd, 'offsetgroup', null, 11) // clear its group
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 https://github.com/plotly/plotly.js/issues/6381#issuecomment-1360562317
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
説明されている alignmentgroup と offsetgroup に対する Plotly.restyle 呼び出しを使い、zz-scatter-grouping-vs-defaults mock で問題を再現します。グループのクリアと割り当ての両方を含めてください。これらのエントリポイントからグループ化の挙動を追跡します。完了条件は、グループをクリアまたは変更しても traces が消えたり、別のグループに移されたり、restyles の順序に依存したりしないことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100