Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add the quiver color draftlog
The entry uses a placeholder number until the upstream pull request exists. Rename draftlogs/XXXX_fix.md to that pull request number.

Co-authored-by: Bennett Payoyo <Yahiro025@users.noreply.github.com>
  • Loading branch information
Yahiro025 committed Sep 23, 2026
commit 9f694b2e5c745653105a790774e2707ffc572c71
1 change: 1 addition & 0 deletions draftlogs/XXXX_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix quiver arrow colors for a discrete `marker.color` array [[#XXXX](https://github.com/plotly/plotly.js/pull/XXXX)]
12 changes: 6 additions & 6 deletions src/traces/quiver/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ function colorscaleStroke(paths, trace) {

// A color-string array is not a colorscale. Apply each string here, because
// `lineGroupStyle` paints an array as black.
const discreteColorStroke = (paths, trace) => {
const strokeArrowColors = (paths, trace) => {
if(trace._hasColorscale) {
colorscaleStroke(paths, trace);
return;
}

const markerColor = (trace.marker || {}).color;
if(!Lib.isArrayOrTypedArray(markerColor)) return;

Expand All @@ -52,11 +57,6 @@ const discreteColorStroke = (paths, trace) => {
});
};

const strokeArrowColors = (paths, trace) => {
if(trace._hasColorscale) colorscaleStroke(paths, trace);
else discreteColorStroke(paths, trace);
};

function style(gd) {
var s = d3.select(gd).selectAll('g.trace.quiver');
s.each(function(d) {
Expand Down