plotly / plotly/plotly.js

Scattergl does not fill (`tonexty`) if another Scattergl trace is present

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

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

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

説明

When attempting to fill the area between two lines using Scattergl, no filled area is showing up when another Scattergl trace is present before the two traces I'm trying to fill between. See the example below.

I'm not sure if this issue is related to some of the other issues posted about Scattergl and filling but none of those seem to mention the filled area not showing up, so I figured I'd post a new issue.

plotly version 5.18.0

Not working

This example shows what i mean:

import plotly.graph_objects as go
import numpy as np

upper_trace = go.Scattergl(
    x=np.arange(10),
    y=np.ones(10),
    mode="lines",
    line_color="blue",
    fill="tonexty",
    legendgroup="area",
)
lower_trace = go.Scattergl(
    x=np.arange(10),
    y=-np.ones(10),
    mode="lines",
    line_color="blue",
    fill="tonexty",
    legendgroup="area",
    showlegend=False,
)
other = go.Scattergl(
    x=np.arange(10),
    y=2 * np.ones(10),
    mode="lines+markers",
    line_color="red",
)

go.Figure([other, upper_trace, lower_trace])

Output:
image

Working
go.Figure([upper_trace, lower_trace, other])

image

Thanks in advance for taking a look.

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

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

はじめの一歩

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

調査の方向性

Plotly 5.18.0 を使用して 2 つの Python 例を再現し、Scattergl トレースとその順序に焦点を当てます。fill="tonexty" に対する Scattergl のレンダリングパスを追跡します。別の Scattergl トレースが 2 つのトレースに先行すると塗りつぶし領域が表示され、順序を変更しても正しい状態が保たれれば完了です。

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

評価

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

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

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