enable tonexty without fallback to tozeroy
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 18.3k
- Forks
- 2k
- Merge medio
- 2 d 12 h
- PR fusionados (30 d)
- 28
Descripción
In our use case, we are plotting quantiles of a data set, with lower and upper bound as well as the median. For convenience, we need to fill in the area between the upper and lower bound shown.
The way we have solved this is by setting fill_type=tonexty on all traces and fill_color=gray on the top four traces, but fill_color=None on the bottom trace.
It looks like this:

The problem is if a user disables the bottom trace, the tonexty fill of the second-to-last trace falls back to tozeroy:

This makes no sense in our case. The expected/intended behavior is:

We have tried/considered several methods:
- Creating a stackgroup; this does allow a fill 'inside' the group only, but requires the trace values to be stacked, which they fundamentally aren't; hiding a trace in that case moves the traces above, which is incorrect.
- Disabling the trace toggle; this hides the problem of course, but it also disables a useful feature
- Dynamically changing the
fill_colors when a trace is hidden; this might work, but I can't find an event to hook into, and since we are using Dash, doing this kind of hacking between Python and clientside callbacks is nontrivial at best.
The best solution would be a fill_type that fills to next but falls back to no fill.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza reproduciendo el ejemplo de quantile-trace descrito en el issue e inspecciona cómo se comporta fill_type=tonexty cuando el trace anterior está oculto. Revisa el comportamiento de fill existente en Plotly.js y determina cómo debería representarse un fallback sin relleno; se considera terminado cuando el caso del trace oculto conserva el área entre los límites restantes sin recurrir a tozeroy.
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
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100