plotly / plotly/plotly.py

Show only exact x matches in hover with hovermode="x unified"

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

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

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

説明

Currently, if there are two traces a, b with hovermode="x unified", then a value from trace b can be shown in the hoverinfo even when I am hovering on a x coordinate where there is no point in trace b, but only in trace a, see picture, where hovering over point from trace a with x=3 shows point from trace b with x=3.05.
I would like a way to enforce that only points with exactly matching x coordinates are shown in the hover (something like hovermode="x unified exact"?).

image

Code to generate figure from the screenshot:

fig = go.Figure(
    layout=go.Layout(hovermode="x unified"),
    data=[
        go.Scatter(
            x=[1, 3],
            y=[1, 1],
            name="a",
        ),
        go.Scatter(
            x=[1, 3.05],
            y=[2, 2],
            name="b",
        ),
    ],
)

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

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

はじめの一歩

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

調査の方向性

提供されている go.Figure の再現例と、その layout 設定 hovermode="x unified" から始め、次にグラフ実装で使用されている hover のマッチング動作を追跡します。対応するオプションまたはモードで、x 座標が完全に一致する trace のみが表示され、その他の場合は既存の unified hover の動作が維持されれば完了です。

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

評価

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

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

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