plotly / plotly/plotly.py

View jumps when zooming line graph

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

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

bug P2
主要言語
Python
スター
18.8k
フォーク
2.8k
平均マージ
16時間 26分
マージ済み PR(30日)
21

説明

I am experiencing the same problem described in this issue for Plotly.js.

In my python implementation, the line graph is so configured:

{
    "xaxis": dict(
        gridcolor="rgba(128, 128, 128, 0.2)",
        zerolinecolor="rgba(128, 128, 128, 0.2)",
        showgrid=True,
        type="date",
        tickformatstops=(
            [dict(dtickrange=[None, None], value="%a %d %b %y - %H:%M")]
        ),
    ),
    "yaxis": dict(
        gridcolor="rgba(128, 128, 128, 0.2)",
        zerolinecolor="rgba(128, 128, 128, 0.2)",
        showgrid=True,
    ),
    "spikedistance": -1,
    "xaxis_showspikes": True,
    "yaxis_showspikes": True,
    "xaxis_spikemode": "across",
    "yaxis_spikemode": "across",
    "xaxis_spikecolor": "rgba(255,255,255,0.5)",
    "yaxis_spikecolor": "rgba(255,255,255,0.5)",
    "xaxis_spikethickness": 1,
    "yaxis_spikethickness": 1,
}

The problem seems to surface when the tick text is long enough and when zooming will cause the tick text to end up at a particular distance from the edge of the line graph. I notice it happens more often when the tick text overflows following a zoom and will be subsequently hidden.

The issue won't occur if I do:

tickformatstops=(
   [dict(dtickrange=[None, None], value="%H:%M")]`
),

Because the resulting tick text won't be long enough.

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

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

はじめの一歩

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

調査の方向性

まず、issue に示されている Python 設定と長い日付 tick ラベルを使ってズーム動作を再現し、その後 Plotly.js issue 7438 と比較します。ズーム後に、はみ出した tick テキストが非表示になるとジャンプが発生するか確認します。長い tick ラベルを使用してもグラフがジャンプしなくなり、短い %H:%M 形式には影響がないことを確認できれば完了です。

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

評価

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

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

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