You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1276,7 +1276,7 @@ The supported stack options are:
1276
1276
-**order** - the order in which stacks are layered
1277
1277
-**reverse** - true to reverse order
1278
1278
1279
-
The following order methods are supported:
1279
+
The following **order** methods are supported:
1280
1280
1281
1281
- null - input order (default)
1282
1282
-*value* - ascending value order (or descending with **reverse**)
@@ -1285,20 +1285,18 @@ The following order methods are supported:
1285
1285
-*inside-out* - order the earliest-appearing series on the inside
1286
1286
- an array of *z* values
1287
1287
1288
-
The **reverse** option reverses the effective order. For the *value* order, Plot.stackY uses the *y*-value whereas Plot.stackX uses the *x*-value. For the *appearance* order, Plot.stackY uses the *x*-position of the maximum *y*-value, and Plot.stackX uses the *y*-position of the maximum *x*-value. If an array of *z* values are specified, they should correspond to the *z* values for all series, and specify the order of those series; this array is typically hard-coded or computed with [d3.groupSort](https://github.com/d3/d3-array/blob/master/README.md#groupSort).
1288
+
The **reverse** option reverses the effective order. For the *value* order, Plot.stackY uses the *y*-value while Plot.stackX uses the *x*-value. For the *appearance* order, Plot.stackY uses the *x*-position of the maximum *y*-value while Plot.stackX uses the *y*-position of the maximum *x*-value. If an array of *z* values are specified, they should enumerate the *z* values for all series in the desired order; this array is typically hard-coded or computed with [d3.groupSort](https://github.com/d3/d3-array/blob/master/README.md#groupSort). Note that the input order (null) and *value* order can produce crossing paths: unlike the other order methods, they do not guarantee a consistent series order across stacks.
1289
1289
1290
-
The input order (null) and *value* order can produce crossing paths: unlike the other order methods, they do not guarantee a consistent series order across stacks.
1290
+
The stack transform supports diverging stacks: negative values are stacked below zero while positive values are stacked above zero. For Plot.stackY, the **y1** channel contains the value of lesser magnitude (closer to zero) while the **y2** channel contains the value of greater magnitude (farther from zero); the difference between the two corresponds to the input **y** channel value. For Plot.stackX, the same is true, except for **x1**, **x2**, and **x** respectively.
1291
1291
1292
-
The stack transform supports diverging stacks: negative values are stacked below zero, while positive values are stacked above zero. For Plot.stackY, the **y1**channel contains the value of lesser magnitude (closer to zero), while the **y2** channel contains the value of greater magnitude (farther from zero); the difference between the two corresponds to the input **y** channel value. For Plot.stackX, the same is true, except for **x1**, **x2**, and **x** respectively.
1292
+
After all values have been stacked from zero, an optional **offset**can be applied to translate or scale the stacks. The following **offset** methods are supported:
1293
1293
1294
-
After all values have been stacked from zero, an optional **offset** strategy can be applied to translate or scale the stacks. The following **offset** options are supported:
1295
-
1296
-
- null - a zero baseline
1294
+
- null - a zero baseline (default)
1297
1295
-*expand* - rescale each stack to fill [0, 1]
1298
1296
-*silhouette* - align the centers of all stacks
1299
1297
-*wiggle* - translate stacks to minimize apparent movement
1300
1298
1301
-
If a given stack has zero total value, the *expand* offset will not adjust the stack’s position. Both the *silhouette* and *wiggle* offsets ensure that the minimum positive value across stacks starts at zero for better default axes. The *wiggle* offset is recommended for streamgraphs, and if used, changes the default order to *inside-out*; see [Byron & Wattenberg](http://leebyron.com/streamgraph/).
1299
+
If a given stack has zero total value, the *expand* offset will not adjust the stack’s position. Both the *silhouette* and *wiggle* offsets ensure that the lowest element across stacks starts at zero for better default axes. The *wiggle* offset is recommended for streamgraphs, and if used, changes the default order to *inside-out*; see [Byron & Wattenberg](http://leebyron.com/streamgraph/).
1302
1300
1303
1301
In addition to the **y1** and **y2** output channels, Plot.stackY computers a **y** output channel that represents the midpoint of **y1** and **y2**. Plot.stackX does the same for **x**. This can be used to position a label or a dot in the center of a stacked layer. The **x** and **y** output channels are lazy: they are only computed if needed by a downstream mark or transform.
0 commit comments