plotly / plotly/react-plotly.js

Issue with axis autorange: state self-mutates 'reversed' -> true

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

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

主要言語
JavaScript
スター
1.1k
フォーク
138
平均マージ
3日 2時間
マージ済み PR(30日)
4

説明

As far as I understand, Plotly's axis reversal works by setting autorange to a string value of 'reversed' (with the other options being true for non-reversed autorange, and false for no autorange). After setting this, Plotly will autoscale the axis with range[0] and range[1] of the axis swapped.

The problem is, it seems like after setting autorange -> 'reversed', react-plotly mutates autorange back to true after doing the range reversal. So, there is no way to un-reverse the autorange without setting it first to false, then true.

What I think should happen:
Step 1: autorange true -> 'reversed'
Step 2: autorange 'reversed' -> true //can toggle axis reversal

What actually happens:
Step 1: autorange true -> 'reversed' -> true //last step being done automatically by react-plotly
Step 2: autorange true -> true //doesn't toggle axis reversal b/c no state change

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

issue に記載された 2 つの autorange 遷移を再現し、React コンポーネントによる Plotly の軸状態の処理に焦点を当てます。完了条件は、true から 'reversed' に変更したときにその値が保持され、その後 true に戻す変更によって、途中で false になることなく反転が切り替わることです。

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

評価

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

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

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