9
9
'use strict' ;
10
10
11
11
var scatterAttrs = require ( '../scatter/attributes' ) ;
12
+ var colorAttributes = require ( '../../components/colorscale/color_attributes' ) ;
13
+
12
14
var DASHES = require ( '../../constants/gl2d_dashes' ) ;
13
15
var MARKERS = require ( '../../constants/gl_markers' ) ;
14
16
var extendFlat = require ( '../../lib/extend' ) . extendFlat ;
17
+ var extendDeep = require ( '../../lib/extend' ) . extendDeep ;
15
18
16
19
var scatterLineAttrs = scatterAttrs . line ,
17
20
scatterMarkerAttrs = scatterAttrs . marker ,
@@ -53,8 +56,7 @@ module.exports = {
53
56
description : 'Sets the style of the lines.'
54
57
}
55
58
} ,
56
- marker : {
57
- color : scatterMarkerAttrs . color ,
59
+ marker : extendDeep ( { } , colorAttributes ( 'marker' ) , {
58
60
symbol : {
59
61
valType : 'enumerated' ,
60
62
values : Object . keys ( MARKERS ) ,
@@ -68,24 +70,11 @@ module.exports = {
68
70
sizemin : scatterMarkerAttrs . sizemin ,
69
71
sizemode : scatterMarkerAttrs . sizemode ,
70
72
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 ,
77
73
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
+ } ) ,
89
78
connectgaps : scatterAttrs . connectgaps ,
90
79
fill : extendFlat ( { } , scatterAttrs . fill , {
91
80
values : [ 'none' , 'tozeroy' , 'tozerox' ]
0 commit comments