[BUG]: The `quiver` trace ignores a discrete `marker.color` array and results in every arrow being black
Offen
Dieses Issue hat noch niemand übernommen.
bug
P2
size: 3
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Problem über die Plotly.newPlot-Aufrufe in den Browser-DevTools, beginnend mit der Implementierung des quiver-Traces. Vergleiche die Behandlung des diskreten marker.color-Arrays mit dem Fall einer numerischen colorscale und überprüfe anschließend, dass jeder Pfeil seine entsprechende Farbe verwendet, während einzelne Farben und colorscales weiterhin funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 72/100