Skip to content

Commit 9f694b2

Browse files
committed
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>
1 parent e218052 commit 9f694b2

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎draftlogs/XXXX_fix.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix quiver arrow colors for a discrete `marker.color` array [[#XXXX](https://github.com/plotly/plotly.js/pull/XXXX)]

‎src/traces/quiver/style.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ function colorscaleStroke(paths, trace) {
3636

3737
// A color-string array is not a colorscale. Apply each string here, because
3838
// `lineGroupStyle` paints an array as black.
39-
const discreteColorStroke = (paths, trace) => {
39+
const strokeArrowColors = (paths, trace) => {
40+
if(trace._hasColorscale) {
41+
colorscaleStroke(paths, trace);
42+
return;
43+
}
44+
4045
const markerColor = (trace.marker || {}).color;
4146
if(!Lib.isArrayOrTypedArray(markerColor)) return;
4247

@@ -52,11 +57,6 @@ const discreteColorStroke = (paths, trace) => {
5257
});
5358
};
5459

55-
const strokeArrowColors = (paths, trace) => {
56-
if(trace._hasColorscale) colorscaleStroke(paths, trace);
57-
else discreteColorStroke(paths, trace);
58-
};
59-
6060
function style(gd) {
6161
var s = d3.select(gd).selectAll('g.trace.quiver');
6262
s.each(function(d) {

0 commit comments

Comments
 (0)