plotly / plotly/plotly.js

Plotly `selected` event infinity loop when using selection 'handles'

オープン
#6,453 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug P2
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

Problem description:
It seems that when selecting data, having the data or layout change dynamically (using restyle or relayout respectively) and then selecting additional data (by moving the 'handles') the event handler then goes into an infinite loop.
Likely, the relayout due to the reselect causes a reselect which causes a relayout which causes a reselect, etc. etc.

Plotly v2.13+ goes into infinite loop when selecting additional data using the 'handles'.
Notice how the 'handles' do not reappear after moving one at the end of gif (has gone into infinite loop):
event2 gif

Plotly below v2.13 has no issues because it is not possible to reselect data using the 'handles':
event1 gif

Minimum working example: MWE
Taken from the example documentation for select-event
Note that this is a problem for Plotly v2.13+, the original example uses v1.58 (as illustrated on that page) which doesn't seem to have the problem (because the selection 'handles' to select data in the plot are not implemented prior to v2.13)
So this seems to be a regression of some kind.

Steps to reproduce:

  1. Run provided MWE
  2. Using lasso select (or other select tool) select some data (first time should not give any problems)
  3. When using Plotly v2.13+, in the selected data use the 'handles' to select additional data points
  4. Plotly now enters an infinite loop

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、提供された MWE を実行し、v2.13+ の動作を select-event のドキュメント例と比較します。restyle または relayout の後にトリガーされる選択ハンドルのフローを追跡し、ハンドルを移動しても無限ループが発生せず、ハンドルが正常に再表示されるようになった時点で issue が解決されたとみなします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
data-visualization
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。