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
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -727,7 +727,7 @@ In addition to the [standard mark options](#marks), the following optional chann
727
727
728
728
By default, the data is assumed to represent a single series (a single value that varies over time, *e.g.*). If the **z** channel is specified, data is grouped by *z* to form separate series. Typically *z* is a categorical value such as a series name. If **z** is not specified, it defaults to **stroke** if a channel, or **fill** if a channel.
729
729
730
-
The **stroke** defaults to currentColor. The **fill** defaults to none. If both the stroke and fill are defined as channels, or if the *z* channel is also specified, it is possible for the stroke or fill to vary within a series; varying color within a series is not supported, however, so only the first channel value for each series is considered. This limitation also applies to the **fillOpacity**, **strokeOpacity**, **strokeWidth**, and **title** channels. The **strokeWidth** defaults to 1.5 and the **strokeMiterlimit** defaults to 1.
730
+
The **fill** defaults to none. The **stroke** defaults to currentColor if the fill is none, and to none otherwise. If both the stroke and fill are defined as channels, or if the *z* channel is also specified, it is possible for the stroke or fill to vary within a series; varying color within a series is not supported, however, so only the first channel value for each series is considered. This limitation also applies to the **fillOpacity**, **strokeOpacity**, **strokeWidth**, and **title** channels. The **strokeWidth** defaults to 1.5 and the **strokeMiterlimit** defaults to 1.
731
731
732
732
Points along the line are connected in input order. Likewise, if there are multiple series via the *z*, *fill*, or *stroke* channel, the series are drawn in input order such that the last series is drawn on top. Typically, the data is already in sorted order, such as chronological for time series; if sorting is needed, consider a [sort transform](#transforms).
733
733
@@ -1006,10 +1006,10 @@ The *filter*, *sort* and *reverse* transforms are also available as functions, a
1006
1006
### Plot.sort(*order*, *options*)
1007
1007
1008
1008
```js
1009
-
Plot.sort(d=>d.value, options) // show data in ascending value order
1009
+
Plot.sort("body_mass_g", options) // show data in ascending body mass order
1010
1010
```
1011
1011
1012
-
Sorts the data by the specified *order*, which can be an acessor function, a comparator function, or a channel value definition.
1012
+
Sorts the data by the specified *order*, which can be an acessor function, a comparator function, or a channel value definition such as a field name.
1013
1013
1014
1014
### Plot.reverse(*options*)
1015
1015
@@ -1022,10 +1022,10 @@ Reverses the order of the data.
1022
1022
### Plot.filter(*test*, *options*)
1023
1023
1024
1024
```js
1025
-
Plot.filter(d=>d.value>3, options) // show data whose value is greater than three
1025
+
Plot.filter(d=>d.body_mass_g>3000, options) // show data whose body mass is greater than 3kg
1026
1026
```
1027
1027
1028
-
Filters the data given the specified *test*. The test can be given as an accessor function (which receives the datum and index), or as a channel value definition; truthy values are retained.
1028
+
Filters the data given the specified *test*. The test can be given as an accessor function (which receives the datum and index), or as a channel value definition such as a field name; truthy values are retained.
0 commit comments