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
* skipNaN
* generalize non-strict reducers (#997)
* generalize non-strict reducers
* tweak
* don’t coerce for mode
* non-strict reducers
* DRY
* mode can be undefined, not NaN
* fix first/last defined logic
* don’t coerce for first and last
* numbers cannot be null
* shorter
* fix comment
Co-authored-by: Philippe Rivière <[email protected]>
* Update README
* Update README
* don’t coerce for min and max
Co-authored-by: Mike Bostock <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1890,9 +1890,9 @@ The Plot.windowX and Plot.windowY transforms compute a moving window around each
1890
1890
* **k** - the window size (the number of elements in the window)
1891
1891
* **anchor** - how to align the window: *start*, *middle*, or *end*
1892
1892
* **reduce** - the aggregation method (window reducer)
1893
-
* **strict** - if true, disallow window truncation; defaults to false
1893
+
* **strict** - if true, output undefined if any window value is undefined; defaults to false
1894
1894
1895
-
If the **strict** option is true, the resulting start values or end values or both (depending on the **anchor**) of each series may be undefined since there are not enough elements to create a window of size **k**. If the **strict** option is false (the default), the window will be automatically truncated as needed. For example, if **k** is 24 and **anchor** is *middle*, then the initial 11 values have effective window sizes of 13, 14, 15, … 23, and likewise the last 12 values have effective window sizes of 23, 22, 21, … 12. Values computed with a truncated window may be noiser; if you would prefer to not show this data, set the **strict** option to true.
1895
+
If the **strict** option is true, the output start values or end values or both (depending on the **anchor**) of each series may be undefined since there are not enough elements to create a window of size **k**; output values may also be undefined if some of the input values in the corresponding window are undefined. If the **strict** option is false (the default), the window will be automatically truncated as needed, and undefined input values are ignored. For example, if **k** is 24 and **anchor** is *middle*, then the initial 11 values have effective window sizes of 13, 14, 15, … 23, and likewise the last 12 values have effective window sizes of 23, 22, 21, … 12. Values computed with a truncated window may be noisy; if you would prefer to not show this data, set the **strict** option to true.
0 commit comments