Skip to content

Commit 3818a8a

Browse files
committed
Update README
1 parent 2bd0c5c commit 3818a8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ Most aggregation methods require binding the output channel to an input channel;
989989
Plot.binX({y: "sum"}, {x: "culmen_length_mm", y: "body_mass_g"})
990990
```
991991

992-
You can control whether a channel is computed before or after binning. If a channel is declared only in *options*, it will be computed after binning and be passed the binned data: each datum is the array of input data correpsonding to the current bin.
992+
You can control whether a channel is computed before or after binning. If a channel is declared only in *options* (and it is not a special group-eligible channel such as *x*, *y*, *z*, *fill*, or stroke), it will be computed after binning and be passed the binned data: each datum is the array of input data correpsonding to the current bin.
993993

994994
```js
995995
Plot.binX({y: "count"}, {x: "economy (mpg)", title: bin => bin.map(d => d.name).join("\n")})
@@ -1001,7 +1001,7 @@ This is equivalent to declaring the channel only in *outputs*.
10011001
Plot.binX({y: "count", title: bin => bin.map(d => d.name).join("\n")}, {x: "economy (mpg)"})
10021002
```
10031003

1004-
However, if a channel is declared in both *outputs* and *options*, then the channel in *options* is computed prior to binning and can then be aggregated using any built-in reducer (or a custom reducer function) during the bin transform.
1004+
However, if a channel is declared in both *outputs* and *options*, then the channel in *options* is computed before binning and can then be aggregated using any built-in reducer (or a custom reducer function) during the bin transform.
10051005

10061006
```js
10071007
Plot.binX({y: "count", title: names => names.join("\n")}, {x: "economy (mpg)", title: "name"})
@@ -1112,7 +1112,7 @@ Most aggregation methods require binding the output channel to an input channel;
11121112
Plot.groupX({y: "sum"}, {x: "species", y: "body_mass_g"})
11131113
```
11141114

1115-
You can control whether a channel is computed before or after grouping. If a channel is declared only in *options*, it will be computed after grouping and be passed the grouped data: each datum is the array of input data correpsonding to the current group.
1115+
You can control whether a channel is computed before or after grouping. If a channel is declared only in *options* (and it is not a special group-eligible channel such as *x*, *y*, *z*, *fill*, or stroke), it will be computed after grouping and be passed the grouped data: each datum is the array of input data correpsonding to the current group.
11161116

11171117
```js
11181118
Plot.groupX({y: "count"}, {x: "species", title: group => group.map(d => d.body_mass_g).join("\n")})
@@ -1124,7 +1124,7 @@ This is equivalent to declaring the channel only in *outputs*.
11241124
Plot.groupX({y: "count", title: group => group.map(d => d.body_mass_g).join("\n")}, {x: "species"})
11251125
```
11261126

1127-
However, if a channel is declared in both *outputs* and *options*, then the channel in *options* is computed prior to grouping and can then be aggregated using any built-in reducer (or a custom reducer function) during the group transform.
1127+
However, if a channel is declared in both *outputs* and *options*, then the channel in *options* is computed before grouping and can then be aggregated using any built-in reducer (or a custom reducer function) during the group transform.
11281128

11291129
```js
11301130
Plot.groupX({y: "count", title: masses => masses.join("\n")}, {x: "species", title: "body_mass_g"})

0 commit comments

Comments
 (0)