@@ -72,6 +72,69 @@ module.exports = {
72
72
'See `y0` for more info.'
73
73
] . join ( ' ' )
74
74
} ,
75
+
76
+ stackgroup : {
77
+ valType : 'string' ,
78
+ role : 'info' ,
79
+ dflt : '' ,
80
+ editType : 'calc' ,
81
+ description : [
82
+ 'Set several scatter traces (on the same subplot) to the same' ,
83
+ 'stackgroup in order to add their y values (or their x values if' ,
84
+ '`orientation` is *h*). If blank or omitted this trace will not be' ,
85
+ 'stacked. Stacking also turns `fill` on by default, using *tonexty*' ,
86
+ '(*tonextx*) if `orientation` is *h* (*v*) and sets the default' ,
87
+ '`mode` to *lines* irrespective of point count.' ,
88
+ 'You can only stack on a numeric (linear or log) axis.'
89
+ ] . join ( ' ' )
90
+ } ,
91
+ orientation : {
92
+ valType : 'enumerated' ,
93
+ role : 'info' ,
94
+ values : [ 'v' , 'h' ] ,
95
+ editType : 'calc' ,
96
+ description : [
97
+ 'Only relevant when `stackgroup` is used, and only the first' ,
98
+ '`orientation` found in the `stackgroup` will be used. Sets the' ,
99
+ 'stacking direction. With *v* (*h*), the y (x) values of subsequent' ,
100
+ 'traces are added. Also affects the default value of `fill`.'
101
+ ] . join ( ' ' )
102
+ } ,
103
+ groupnorm : {
104
+ valType : 'enumerated' ,
105
+ values : [ '' , 'fraction' , 'percent' ] ,
106
+ dflt : '' ,
107
+ role : 'info' ,
108
+ editType : 'calc' ,
109
+ description : [
110
+ 'Only relevant when `stackgroup` is used, and only the first' ,
111
+ '`groupnorm` found in the `stackgroup` will be used.' ,
112
+ 'Sets the normalization for the sum of this `stackgroup`.' ,
113
+ 'With *fraction*, the value of each trace at each location is' ,
114
+ 'divided by the sum of all trace values at that location.' ,
115
+ '*percent* is the same but multiplied by 100 to show percentages.'
116
+ ] . join ( ' ' )
117
+ } ,
118
+ stackgaps : {
119
+ valType : 'enumerated' ,
120
+ values : [ 'infer zero' , 'interpolate' ] ,
121
+ dflt : 'infer zero' ,
122
+ role : 'info' ,
123
+ editType : 'calc' ,
124
+ description : [
125
+ 'Only relevant when `stackgroup` is used, and only the first' ,
126
+ '`stackgaps` found in the `stackgroup` will be used.' ,
127
+ 'Determines how we handle locations at which other traces in this' ,
128
+ 'group have data but this one does not.' ,
129
+ 'With *infer zero* we insert a zero at these locations.' ,
130
+ 'With *interpolate* we linearly interpolate between existing' ,
131
+ 'values, and extrapolate a constant beyond the existing values.'
132
+ // TODO - implement interrupt mode
133
+ // '*interrupt* omits this trace from the stack at this location by',
134
+ // 'dropping abruptly, midway between the existing and missing locations.'
135
+ ] . join ( ' ' )
136
+ } ,
137
+
75
138
text : {
76
139
valType : 'string' ,
77
140
role : 'info' ,
@@ -114,7 +177,8 @@ module.exports = {
114
177
'If the provided `mode` includes *text* then the `text` elements' ,
115
178
'appear at the coordinates. Otherwise, the `text` elements' ,
116
179
'appear on hover.' ,
117
- 'If there are less than ' + constants . PTS_LINESONLY + ' points,' ,
180
+ 'If there are less than ' + constants . PTS_LINESONLY + ' points' ,
181
+ 'and the trace is not stacked' ,
118
182
'then the default is *lines+markers*. Otherwise, *lines*.'
119
183
] . join ( ' ' )
120
184
} ,
@@ -212,11 +276,12 @@ module.exports = {
212
276
fill : {
213
277
valType : 'enumerated' ,
214
278
values : [ 'none' , 'tozeroy' , 'tozerox' , 'tonexty' , 'tonextx' , 'toself' , 'tonext' ] ,
215
- dflt : 'none' ,
216
279
role : 'style' ,
217
280
editType : 'calc' ,
218
281
description : [
219
282
'Sets the area to fill with a solid color.' ,
283
+ 'Defaults to *none* unless this trace is stacked, then it gets' ,
284
+ '*tonexty* (*tonextx*) if `orientation` is *v* (*h*)' ,
220
285
'Use with `fillcolor` if not *none*.' ,
221
286
'*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.' ,
222
287
'*tonextx* and *tonexty* fill between the endpoints of this' ,
0 commit comments