Skip to content

Commit 05c5782

Browse files
committed
Update CHANGELOG
1 parent db114c0 commit 05c5782

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ The bin and group transforms now propagate the *title* and *href* channels, if p
6868
Plot.rectY(data, Plot.binX({y: "count"}, {x: "body_mass_g", fill: "species", title: d => `${d.species} ${d.sex}`}))
6969
```
7070

71-
The bin transform now supports shorthand reducers for the bin extent: *x1*, *x2*, *y1*, and *y2*. The window transform now supports the *first* and *last* reducers to select the first or last element of the window, respectively.
71+
The bin transform now supports shorthand reducers for the bin extent: *x1*, *x2*, *y1*, and *y2*. The window transform now supports the *first* and *last* reducers to select the first or last element of the window, respectively. The new generalized [select transform](./README.md#select) can now call a custom function, or the shorthand *min* and *max*, to select the points to display. The function is passed two arguments: the index of the current group (*e.g.*, [0, 1, 2, …]), and the designated channel’s values. For example one can select the dot with the highest *fill* value with:
72+
73+
```js
74+
Plot.dotX(data, Plot.select({fill: "max"}, {x: "letter", fill: "frequency", stroke: "black"})
75+
```
7276
7377
The *color* scale now defaults to an *identity* scale if all associated defined values are valid CSS colors, rather than defaulting to the tableau10 categorical color scheme. Similarly, the new *symbol* scale defaults to *identity* if all associated defined values are valid symbol names (or symbol type objects).
7478
@@ -78,20 +82,14 @@ The *color* scale now defaults to an *identity* scale if all associated defined
7882
Plot.barY(alphabet, {x: "letter", y: "frequency", fill: d => /[AEIOU]/.test(d.letter) ? "red" : "black"})
7983
```
8084
81-
The new [Plot.scale](./README.md#scale-options) method allows you to construct a standalone scale for use independent of any chart, or across charts. The returned object is has the same form as *plot*.scale(*name*), allowing you to inspect the scale options and invoke the scale programmatically with *scale*.apply (and *scale*.invert, where applicable).
85+
The new [Plot.scale](./README.md#scale-options) method allows you to construct a standalone scale for use independent of any chart, or across charts. The returned object has the same form as *plot*.scale(*name*), allowing you to inspect the scale options and invoke the scale programmatically with *scale*.apply (and *scale*.invert, where applicable).
8286
8387
```js
8488
const scale = Plot.scale({color: {type: "linear"}});
8589
console.log(scale.domain); // [0, 1]
8690
console.log(scale.apply(0.5)); // "rgb(149, 251, 81)"
8791
```
8892
89-
The new generalized [select transform](./README.md#select) can now call a custom function, or the shorthand *min* and *max*, to select the points to display. The function is passed two arguments: the index of the current group (*e.g.*, [0, 1, 2, …]), and the designated channel’s values. For example one can select the dot with the highest *fill* value with:
90-
91-
```js
92-
Plot.dotX(data, Plot.select({fill: "max"}, {x: "letter", fill: "frequency", stroke: "black"})
93-
```
94-
9593
This release includes various minor new features and bug fixes. A top-level *clamp* option is now available to apply to all scales. When margins or insets would result in a scale’s range being inverted, Plot now collapses the range instead of producing confusing output. When the *buylrd* color scheme is applied to a (discrete) ordinal scale, it now has the expected colors (not *rdgy*). Plot now ignores non-finite values when inferring the default domain for quantitative scales. The *swatches* legend now wraps correctly in narrow windows. When the *tickFormat* option is null, ticks will now be unlabeled (rather than using the default format). Plot no longer crashes when you try to display a legend on an identity color scale.
9694
9795
To improve compatibility with popular bundlers such as webpack and Rollup, Plot no longer uses circular ES module imports, thereby avoiding the dreaded temporal dead zone. Plot now uses [vite](https://vitejs.dev) for local development, offering a significant reduction in dependencies.

0 commit comments

Comments
 (0)