9
9
10
10
'use strict' ;
11
11
12
- var scatterMapboxAttrs = require ( '../../traces/scattermapbox/attributes' ) ;
13
12
var defaultLine = require ( '../../components/color' ) . defaultLine ;
14
- var extendFlat = require ( '../../lib' ) . extendFlat ;
15
-
16
- var lineAttrs = scatterMapboxAttrs . line ;
17
13
18
14
19
15
module . exports = {
@@ -129,12 +125,14 @@ module.exports = {
129
125
130
126
type : {
131
127
valType : 'enumerated' ,
132
- values : [ 'line' , 'fill' ] ,
128
+ values : [ 'circle' , ' line', 'fill' ] ,
133
129
dflt : 'line' ,
134
130
role : 'info' ,
135
131
description : [
136
132
'Sets the layer type.' ,
137
- 'Support for *raster*, *background* types is coming soon.'
133
+ 'Support for *raster*, *background* types is coming soon.' ,
134
+ 'Note that *line* and *fill* are not compatible with Point' ,
135
+ 'GeoJSON geometry.'
138
136
] . join ( ' ' )
139
137
} ,
140
138
@@ -150,14 +148,68 @@ module.exports = {
150
148
] . join ( ' ' )
151
149
} ,
152
150
151
+ circle : {
152
+ radius : {
153
+ valType : 'number' ,
154
+ dflt : 15 ,
155
+ role : 'style' ,
156
+ description : [
157
+ 'Sets the circle radius.' ,
158
+ 'Has an effect only when `type` is set to *circle*.'
159
+ ] . join ( ' ' )
160
+ } ,
161
+ color : {
162
+ valType : 'color' ,
163
+ dflt : defaultLine ,
164
+ role : 'style' ,
165
+ description : [
166
+ 'Sets the circle color.' ,
167
+ 'Has an effect only when `type` is set to *circle*.'
168
+ ] . join ( ' ' )
169
+ }
170
+ } ,
171
+
153
172
line : {
154
- color : extendFlat ( { } , lineAttrs . color , {
155
- dflt : defaultLine
156
- } ) ,
157
- width : lineAttrs . width
173
+ width : {
174
+ valType : 'number' ,
175
+ dflt : 2 ,
176
+ role : 'style' ,
177
+ description : [
178
+ 'Sets the line radius.' ,
179
+ 'Has an effect only when `type` is set to *line*.'
180
+ ] . join ( ' ' )
181
+ } ,
182
+ color : {
183
+ valType : 'color' ,
184
+ dflt : defaultLine ,
185
+ role : 'style' ,
186
+ description : [
187
+ 'Sets the line color.' ,
188
+ 'Has an effect only when `type` is set to *line*.'
189
+ ] . join ( ' ' )
190
+ }
158
191
} ,
159
192
160
- fillcolor : scatterMapboxAttrs . fillcolor ,
193
+ fill : {
194
+ color : {
195
+ valType : 'color' ,
196
+ dflt : defaultLine ,
197
+ role : 'style' ,
198
+ description : [
199
+ 'Sets the fill color.' ,
200
+ 'Has an effect only when `type` is set to *fill*.'
201
+ ] . join ( ' ' )
202
+ } ,
203
+ outlinecolor : {
204
+ valType : 'color' ,
205
+ dflt : defaultLine ,
206
+ role : 'style' ,
207
+ description : [
208
+ 'Sets the fill outline color.' ,
209
+ 'Has an effect only when `type` is set to *fill*.'
210
+ ] . join ( ' ' )
211
+ }
212
+ } ,
161
213
162
214
opacity : {
163
215
valType : 'number' ,
0 commit comments