Skip to content

Commit 689a680

Browse files
committed
581a dry colors - scattergl
1 parent 7e7a6db commit 689a680

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

src/traces/scattergl/attributes.js

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
'use strict';
1010

1111
var scatterAttrs = require('../scatter/attributes');
12+
var colorAttributes = require('../../components/colorscale/color_attributes');
13+
1214
var DASHES = require('../../constants/gl2d_dashes');
1315
var MARKERS = require('../../constants/gl_markers');
1416
var extendFlat = require('../../lib/extend').extendFlat;
17+
var extendDeep = require('../../lib/extend').extendDeep;
1518

1619
var scatterLineAttrs = scatterAttrs.line,
1720
scatterMarkerAttrs = scatterAttrs.marker,
@@ -53,8 +56,7 @@ module.exports = {
5356
description: 'Sets the style of the lines.'
5457
}
5558
},
56-
marker: {
57-
color: scatterMarkerAttrs.color,
59+
marker: extendDeep({}, colorAttributes('marker'), {
5860
symbol: {
5961
valType: 'enumerated',
6062
values: Object.keys(MARKERS),
@@ -68,24 +70,11 @@ module.exports = {
6870
sizemin: scatterMarkerAttrs.sizemin,
6971
sizemode: scatterMarkerAttrs.sizemode,
7072
opacity: scatterMarkerAttrs.opacity,
71-
colorscale: scatterMarkerAttrs.colorscale,
72-
cauto: scatterMarkerAttrs.cauto,
73-
cmax: scatterMarkerAttrs.cmax,
74-
cmin: scatterMarkerAttrs.cmin,
75-
autocolorscale: scatterMarkerAttrs.autocolorscale,
76-
reversescale: scatterMarkerAttrs.reversescale,
7773
showscale: scatterMarkerAttrs.showscale,
78-
line: {
79-
color: scatterMarkerLineAttrs.color,
80-
width: scatterMarkerLineAttrs.width,
81-
colorscale: scatterMarkerLineAttrs.colorscale,
82-
cauto: scatterMarkerLineAttrs.cauto,
83-
cmax: scatterMarkerLineAttrs.cmax,
84-
cmin: scatterMarkerLineAttrs.cmin,
85-
autocolorscale: scatterMarkerLineAttrs.autocolorscale,
86-
reversescale: scatterMarkerLineAttrs.reversescale
87-
}
88-
},
74+
line: extendDeep({}, colorAttributes('marker.line'), {
75+
width: scatterMarkerLineAttrs.width
76+
})
77+
}),
8978
connectgaps: scatterAttrs.connectgaps,
9079
fill: extendFlat({}, scatterAttrs.fill, {
9180
values: ['none', 'tozeroy', 'tozerox']

0 commit comments

Comments
 (0)