@@ -72,6 +72,69 @@ module.exports = {
7272 'See `y0` for more info.'
7373 ] . join ( ' ' )
7474 } ,
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+
75138 text : {
76139 valType : 'string' ,
77140 role : 'info' ,
@@ -114,7 +177,8 @@ module.exports = {
114177 'If the provided `mode` includes *text* then the `text` elements' ,
115178 'appear at the coordinates. Otherwise, the `text` elements' ,
116179 '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' ,
118182 'then the default is *lines+markers*. Otherwise, *lines*.'
119183 ] . join ( ' ' )
120184 } ,
@@ -212,11 +276,12 @@ module.exports = {
212276 fill : {
213277 valType : 'enumerated' ,
214278 values : [ 'none' , 'tozeroy' , 'tozerox' , 'tonexty' , 'tonextx' , 'toself' , 'tonext' ] ,
215- dflt : 'none' ,
216279 role : 'style' ,
217280 editType : 'calc' ,
218281 description : [
219282 '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*)' ,
220285 'Use with `fillcolor` if not *none*.' ,
221286 '*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.' ,
222287 '*tonextx* and *tonexty* fill between the endpoints of this' ,
0 commit comments