Skip to content

Commit 6e61f3b

Browse files
committed
fix parcoords, fix default colorscale
1 parent 0e98c5b commit 6e61f3b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/components/colorscale/defaults.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ module.exports = function colorScaleDefaults(traceIn, traceOut, layout, coerce,
4848
containerOut.sequential = layoutColorscale.sequential;
4949
containerOut.sequentialminus = layoutColorscale.sequentialminus;
5050
var dfltScl = containerOut.diverging;
51-
var sclOut = coerce(prefix + 'colorscale', dfltScl);
51+
var sclOut;
52+
if(dfltScl) sclOut = coerce(prefix + 'colorscale', dfltScl);
53+
else sclOut = coerce(prefix + 'colorscale');
5254

5355
// reversescale is handled at the containerOut level
5456
var reverseScale = coerce(prefix + 'reversescale');

test/jasmine/tests/parcoords_test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ describe('parcoords initialization tests', function() {
141141
cauto: true,
142142
autocolorscale: false,
143143
reversescale: false,
144-
showscale: false
144+
showscale: false,
145+
diverging: undefined,
146+
sequential: undefined,
147+
sequentialminus: undefined
145148
});
146149
});
147150

@@ -278,6 +281,9 @@ describe('parcoords initialization tests', function() {
278281
]
279282
}));
280283

284+
delete(fullTrace.line.diverging);
285+
delete(fullTrace.line.sequential);
286+
delete(fullTrace.line.sequentialminus);
281287
expect(fullTrace.line).toEqual({
282288
color: [35, 63, 21, 42],
283289
colorscale: attributes.line.colorscale.dflt,

0 commit comments

Comments
 (0)