[BUG]: The `quiver` trace ignores a discrete `marker.color` array and results in every arrow being black
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- data-visualization
Research direction
Reproduce the issue through the Plotly.newPlot calls in the browser devtools, starting with the quiver trace implementation. Compare handling of the discrete marker.color array with the numeric colorscale case, then verify that each arrow uses its corresponding color while single colors and colorscales continue to work.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.js
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
chore P3 plotly-internal size: 3 task
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
chore P1 plotly-internal size: 1 task
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
chore P3 plotly-internal size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
All issues in plotly/plotly.js
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
TheOdinProject/curriculum#31423 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
WGBH-MLA/dream-aapb#69 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
Mintplex-Labs/anything-llm#6490 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
openlayers/ol-cesium#1364 ·