plotly / plotly/plotly.js

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

Abierto
#6,795 0 comentarios 10 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug P3
Lenguaje dominante
JavaScript
Estrellas
18.3k
Forks
2k
Merge medio
2 d 12 h
PR fusionados (30 d)
28

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Reproduce los dos ejemplos de Python con Plotly 5.18.0, centrándote en las trazas Scattergl y en su orden. Sigue la ruta de renderizado de Scattergl para fill="tonexty"; se considera terminado cuando el área rellena aparece al colocar otra traza Scattergl antes de las dos trazas y sigue siendo correcta cuando se cambia el orden.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
data-visualization
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.