Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 47bef38

Browse filesBrowse files
committed
revise parcoords unselected.line color & opacity dflts
1 parent f2a0704 commit 47bef38
Copy full SHA for 47bef38

File tree

Expand file treeCollapse file tree

6 files changed

+18
-13
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+18
-13
lines changed

‎src/traces/parcoords/attributes.js

Copy file name to clipboardExpand all lines: src/traces/parcoords/attributes.js
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,24 @@ module.exports = {
139139
line: {
140140
color: {
141141
valType: 'color',
142-
dflt: '',
142+
dflt: '#777',
143143
editType: 'plot',
144-
description: 'Sets the color of unselected lines.'
144+
description: [
145+
'Sets the base color of unselected lines.',
146+
'in connection with `unselected.line.opacity`.'
147+
].join(' ')
145148
},
146149
opacity: {
147150
valType: 'number',
148151
min: 0,
149152
max: 1,
150153
dflt: 'auto',
151154
editType: 'plot',
152-
description: 'Sets the opacity of unselected lines.'
155+
description: [
156+
'Sets the opacity of unselected lines.',
157+
'The default *auto* decreases the opacity smoothly as the number of lines increases.',
158+
'Use *1* to achieve exact `unselected.line.color`.'
159+
].join(' ')
153160
},
154161
editType: 'plot'
155162
},

‎src/traces/parcoords/defaults.js

Copy file name to clipboardExpand all lines: src/traces/parcoords/defaults.js
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
7171
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
7272
}
7373

74-
function coerce2(attr, dflt) {
75-
return Lib.coerce2(traceIn, traceOut, attributes, attr, dflt);
76-
}
77-
7874
var dimensionsIn = traceIn.dimensions;
7975
if(Array.isArray(dimensionsIn) && dimensionsIn.length > maxDimensionCount) {
8076
Lib.log('parcoords traces support up to ' + maxDimensionCount + ' dimensions at the moment');
@@ -112,6 +108,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
112108
coerce('labelangle');
113109
coerce('labelside');
114110

115-
var unselectedLineColor = coerce2('unselected.line.color');
116-
coerce('unselected.line.opacity', unselectedLineColor ? 1 : 'auto');
111+
coerce('unselected.line.color');
112+
coerce('unselected.line.opacity');
117113
};

‎src/traces/parcoords/parcoords.js

Copy file name to clipboardExpand all lines: src/traces/parcoords/parcoords.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ function model(layout, d, i) {
150150
var lineColor = helpers.convertTypedArray(cd0.lineColor);
151151
var line = trace.line;
152152
var deselectedLines = {
153-
color: rgba(trace.unselected.line.color || '#777'),
153+
color: rgba(trace.unselected.line.color),
154154
opacity: trace.unselected.line.opacity
155155
};
156156
var cOpts = Colorscale.extractOpts(line);
Loading

‎test/image/mocks/gl2d_parcoords_constraints.json

Copy file name to clipboardExpand all lines: test/image/mocks/gl2d_parcoords_constraints.json
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"layout": {
3+
"paper_bgcolor": "lightgray",
34
"width": 1000,
45
"height": 400
56
},
@@ -26,6 +27,7 @@
2627

2728
"unselected": {
2829
"line": {
30+
"opacity": 1,
2931
"color": "white"
3032
}
3133
},

‎test/plot-schema.json

Copy file name to clipboardExpand all lines: test/plot-schema.json
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40359,14 +40359,14 @@
4035940359
"editType": "plot",
4036040360
"line": {
4036140361
"color": {
40362-
"description": "Sets the color of unselected lines.",
40363-
"dflt": "",
40362+
"description": "Sets the base color of unselected lines. in connection with `unselected.line.opacity`.",
40363+
"dflt": "#777",
4036440364
"editType": "plot",
4036540365
"valType": "color"
4036640366
},
4036740367
"editType": "plot",
4036840368
"opacity": {
40369-
"description": "Sets the opacity of unselected lines.",
40369+
"description": "Sets the opacity of unselected lines. The default *auto* decreases the opacity smoothly as the number of lines increases. Use *1* to achieve exact `unselected.line.color`.",
4037040370
"dflt": "auto",
4037140371
"editType": "plot",
4037240372
"max": 1,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.