plotly / plotly/plotly.js

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

Aperta
#6,795 0 commenti 10 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug P3
Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 12h
PR unite (30g)
28

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci i due esempi Python con Plotly 5.18.0, concentrandoti sulle tracce Scattergl e sul loro ordinamento. Traccia il percorso di rendering di Scattergl per fill="tonexty"; il lavoro è completato quando l’area riempita appare se un’altra traccia Scattergl precede le due tracce e rimane corretta quando l’ordine viene modificato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.