[BUG]: The `quiver` trace ignores a discrete `marker.color` array and results in every arrow being black
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
Description
The quiver trace ignores a discrete marker.color array. Every arrow ends up black instead of taking its per-point color. A numeric array with a colorscale works, and a single color string works.
Screenshots/Video
| No colorscale (the bug) | With colorscale (for comparison) |
|---|---|
Steps to reproduce
- Open plotly devtools
- Run the following snippet in the browser devtools console
Plotly.newPlot(gd, [{ type: 'quiver', x: [1, 2, 3], y: [1, 2, 3], u: [1, 1, 1], v: [0, 1, 0], marker: { color: ['rgb(23, 103, 194)', '#FF4136', '#2ECC40'], line: { width: 3 } } }]); - Note that all three arrows are
rgb(0, 0, 0)(by inspection of using your eyes) - Run the following modified snippet:
Plotly.newPlot(gd, [{ type: 'quiver', x: [1, 2, 3], y: [1, 2, 3], u: [1, 1, 1], v: [0, 1, 0], marker: { color: [0, 5, 10], line: { width: 3 } }, colorscale: 'Viridis' }]); - Note that the arrows have the correct color
Notes
marker.coloris documented asarrayOk, so the black arrows seem to be a rendering bug (rather than an unsupported input)- Per the schema, each arrow should be drawn as its own color from the array. If this behavior is intentional, we should update the description.
- This was found while working on #8025
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
Reproduce el problema mediante las llamadas a Plotly.newPlot en las herramientas de desarrollo del navegador, comenzando por la implementación del trace quiver. Compara el tratamiento del array discreto marker.color con el caso de una colorscale numérica y, después, verifica que cada flecha use su color correspondiente, mientras que los colores individuales y las colorscales sigan funcionando.
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
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bien especificado
- Aptitud para principiantes
- 72/100