9
9
'use strict' ;
10
10
11
11
var heatmapAttrs = require ( '../heatmap/attributes' ) ;
12
+ var contourAttrs = require ( '../contour/attributes' ) ;
13
+ var contourContourAttrs = contourAttrs . contours ;
12
14
var scatterAttrs = require ( '../scatter/attributes' ) ;
13
15
var colorscaleAttrs = require ( '../../components/colorscale/attributes' ) ;
14
16
var colorbarAttrs = require ( '../../components/colorbar/attributes' ) ;
@@ -58,30 +60,8 @@ module.exports = extendFlat({}, {
58
60
] . join ( ' ' )
59
61
} ,
60
62
61
- autocontour : {
62
- valType : 'boolean' ,
63
- dflt : true ,
64
- role : 'style' ,
65
- description : [
66
- 'Determines whether or not the contour level attributes are' ,
67
- 'picked by an algorithm.' ,
68
- 'If *true*, the number of contour levels can be set in `ncontours`.' ,
69
- 'If *false*, set the contour level attributes in `contours`.'
70
- ] . join ( ' ' )
71
- } ,
72
- ncontours : {
73
- valType : 'integer' ,
74
- dflt : 15 ,
75
- min : 1 ,
76
- role : 'style' ,
77
- description : [
78
- 'Sets the maximum number of contour levels. The actual number' ,
79
- 'of contours will be chosen automatically to be less than or' ,
80
- 'equal to the value of `ncontours`.' ,
81
- 'Has an effect only if `autocontour` is *true* or if' ,
82
- '`contours.size` is missing.'
83
- ] . join ( ' ' )
84
- } ,
63
+ autocontour : contourAttrs . autocontour ,
64
+ ncontours : contourAttrs . ncontours ,
85
65
86
66
contours : {
87
67
type : {
@@ -96,35 +76,11 @@ module.exports = extendFlat({}, {
96
76
'`value` parameters.'
97
77
] . join ( ' ' )
98
78
} ,
99
- start : {
100
- valType : 'number' ,
101
- dflt : null ,
102
- role : 'style' ,
103
- description : [
104
- 'Sets the starting contour level value.' ,
105
- 'Must be less than `contours.end`'
106
- ] . join ( ' ' )
107
- } ,
108
- end : {
109
- valType : 'number' ,
110
- dflt : null ,
111
- role : 'style' ,
112
- description : [
113
- 'Sets the end contour level value.' ,
114
- 'Must be more than `contours.start`'
115
- ] . join ( ' ' )
116
- } ,
117
- size : {
118
- valType : 'number' ,
119
- dflt : null ,
120
- min : 0 ,
121
- role : 'style' ,
122
- description : [
123
- 'Sets the step between each contour level.' ,
124
- 'Must be positive.'
125
- ] . join ( ' ' )
126
- } ,
79
+ start : contourContourAttrs . start ,
80
+ end : contourContourAttrs . end ,
81
+ size : contourContourAttrs . size ,
127
82
coloring : {
83
+ // from contourAttrs.contours.coloring but no 'heatmap' option
128
84
valType : 'enumerated' ,
129
85
values : [ 'fill' , 'lines' , 'none' ] ,
130
86
dflt : 'fill' ,
@@ -136,15 +92,7 @@ module.exports = extendFlat({}, {
136
92
'If *none*, no coloring is applied on this trace.'
137
93
] . join ( ' ' )
138
94
} ,
139
- showlines : {
140
- valType : 'boolean' ,
141
- dflt : true ,
142
- role : 'style' ,
143
- description : [
144
- 'Determines whether or not the contour lines are drawn.' ,
145
- 'Has only an effect if `contours.coloring` is set to *fill*.'
146
- ] . join ( ' ' )
147
- } ,
95
+ showlines : contourContourAttrs . showlines ,
148
96
operation : {
149
97
valType : 'enumerated' ,
150
98
values : [ ] . concat ( constants . INEQUALITY_OPS ) . concat ( constants . INTERVAL_OPS ) . concat ( constants . SET_OPS ) ,
0 commit comments