Skip to content

Commit 6290a83

Browse files
committed
Chill parcoord attribs out
1 parent fc5a73a commit 6290a83

File tree

2 files changed

+15
-27
lines changed

2 files changed

+15
-27
lines changed

src/traces/parcoords/attributes.js

+15-26
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ var extendDeep = require('../../lib/extend').extendDeep;
1818
var extendFlat = require('../../lib/extend').extendFlat;
1919

2020
module.exports = {
21-
2221
domain: {
2322
x: {
2423
valType: 'info_array',
@@ -120,36 +119,26 @@ module.exports = {
120119
description: 'The dimensions (variables) of the parallel coordinates chart. 2..60 dimensions are supported.'
121120
},
122121

123-
line: extendFlat({},
124-
122+
line: extendFlat(
125123
// the default autocolorscale isn't quite usable for parcoords due to context ambiguity around 0 (grey, off-white)
126-
// autocolorscale therefore defaults to false too, to avoid being overridden by the blue-white-red autocolor palette
124+
// autocolorscale therefore defaults to false too, to avoid being overridden by the blue-white-red autocolor palette
127125
extendDeep(
128-
{},
129126
colorAttributes('line'),
130127
{
131-
colorscale: extendDeep(
132-
{},
133-
colorAttributes('line').colorscale,
134-
{dflt: colorscales.Viridis}
135-
),
136-
autocolorscale: extendDeep(
137-
{},
138-
colorAttributes('line').autocolorscale,
139-
{
140-
dflt: false,
141-
description: [
142-
'Has an effect only if line.color` is set to a numerical array.',
143-
'Determines whether the colorscale is a default palette (`autocolorscale: true`)',
144-
'or the palette determined by `line.colorscale`.',
145-
'In case `colorscale` is unspecified or `autocolorscale` is true, the default ',
146-
'palette will be chosen according to whether numbers in the `color` array are',
147-
'all positive, all negative or mixed.',
148-
'The default value is false, so that `parcoords` colorscale can default to `Viridis`.'
149-
].join(' ')
150-
}
151-
)
152128

129+
colorscale: {dflt: colorscales.Viridis},
130+
autocolorscale: {
131+
dflt: false,
132+
description: [
133+
'Has an effect only if line.color` is set to a numerical array.',
134+
'Determines whether the colorscale is a default palette (`autocolorscale: true`)',
135+
'or the palette determined by `line.colorscale`.',
136+
'In case `colorscale` is unspecified or `autocolorscale` is true, the default ',
137+
'palette will be chosen according to whether numbers in the `color` array are',
138+
'all positive, all negative or mixed.',
139+
'The default value is false, so that `parcoords` colorscale can default to `Viridis`.'
140+
].join(' ')
141+
}
153142
}
154143
),
155144

src/traces/parcoords/parcoords.js

-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ function styleExtentTexts(selection) {
254254
}
255255

256256
module.exports = function(root, svg, styledData, layout, callbacks) {
257-
258257
var domainBrushing = false;
259258
var linePickActive = true;
260259

0 commit comments

Comments
 (0)