Skip to content

Commit b21b74c

Browse files
committed
expose parcoords context line color
1 parent 9a611b3 commit b21b74c

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

src/traces/parcoords/attributes.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,21 @@ module.exports = {
141141
description: 'The dimensions (variables) of the parallel coordinates chart. 2..60 dimensions are supported.'
142142
}),
143143

144+
bgline: {
145+
color: {
146+
valType: 'color',
147+
dflt: '#777',
148+
role: 'style',
149+
editType: 'plot',
150+
description: [
151+
'Sets the color of lines in the background',
152+
'i.e. unselected lines.'
153+
].join(' ')
154+
},
155+
156+
editType: 'calc'
157+
},
158+
144159
line: extendFlat({editType: 'calc'},
145160
colorScaleAttrs('line', {
146161
// the default autocolorscale isn't quite usable for parcoords due to context ambiguity around 0 (grey, off-white)

src/traces/parcoords/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ module.exports = {
1919
layers: ['contextLineLayer', 'focusLineLayer', 'pickLineLayer'],
2020
axisTitleOffset: 28,
2121
axisExtentOffset: 10,
22-
deselectedLineColor: '#777',
2322
bar: {
2423
width: 4, // Visible width of the filter bar
2524
captureWidth: 10, // Mouse-sensitive width for interaction (Fitts law)

src/traces/parcoords/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,5 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
115115

116116
coerce('labelangle');
117117
coerce('labelside');
118+
coerce('bgline.color');
118119
};

src/traces/parcoords/parcoords.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function model(layout, d, i) {
154154
var trace = cd0.trace;
155155
var lineColor = helpers.convertTypedArray(cd0.lineColor);
156156
var line = trace.line;
157-
var deselectedLines = {color: rgba(c.deselectedLineColor)};
157+
var deselectedLines = {color: rgba(trace.bgline.color)};
158158
var cOpts = Colorscale.extractOpts(line);
159159
var cscale = cOpts.reversescale ? Colorscale.flipScale(cd0.cscale) : cd0.cscale;
160160
var domain = trace.domain;

0 commit comments

Comments
 (0)