|
4 | 4 |
|
5 | 5 | *Not yet released. These are forthcoming changes in the main branch.*
|
6 | 6 |
|
7 |
| -Mark initializers with the **initializer** option! Plot.initializer for creating custom initializers. [breaking] *mark*.initialize return signature. |
| 7 | +Plot now supports mark initializers via the **initializer** option; these can be used to transform or derive new channels. Unlike data transforms which operate in abstract data space, initializers can operate in screen space such as pixel coordinates and colors. For example, initializers can modify a marks’ positions to avoid occlusion. The new hexbin and dodge transforms are implemented as mark initializers. |
8 | 8 |
|
9 |
| -Hexbin transform. Hexgrid, circle, and hexagon marks. Mark channels can define a radius hint to set the upper bound of the default range of the *r* scale. |
| 9 | +The new hexbin transform functions similarly to the bin transform, except it aggregates both *x* and *y* into hexagonal bins before reducing. The size of the hexagons can be specified with the **binWidth** option, which controls the width of the (pointy-topped) hexagons. |
10 | 10 |
|
11 |
| -Dodge transform. |
| 11 | +The new hexgrid decoration mark draws a hexagonal grid. It is intended to be used with the hexbin transform as an alternative to the default horizontal and vertical axis grid. |
12 | 12 |
|
13 |
| -[breaking] Color scales with diverging color schemes now default to the *diverging* scale type instead of the *linear* scale type. |
| 13 | +The dot mark now supports the *hexagon* symbol type for pointy-topped hexagons. The new circle and hexagon marks are convenience shorthand for dot marks with the *circle* and *hexagon* symbol, respectively. The dotX, dotY, textX, and textY marks now support the **interval** option. |
| 14 | + |
| 15 | +The new dodge transform can be used to produce beeswarm plots. Given an *x* channel representing the desired horizontal position of circles, the dodgeY transform derives a new *y* (vertical position) channel such that the circles do not overlap; the dodgeX transform similarly derives a new *x* channel given a *y* channel. If an *r* channel is specified, the circles may have varying radius. |
14 | 16 |
|
15 |
| -The **sort** option now supports index sorting. |
| 17 | +The mark **sort** option now supports index sorting. For example, to sort dots by ascending radius: |
16 | 18 |
|
17 | 19 | ~~~js
|
18 |
| -Plot.dot(earthquakes, {x: "longitude", y: "latitude", r: "intensity", sort: {channel: "r", reverse: true}}) |
| 20 | +Plot.dot(earthquakes, {x: "longitude", y: "latitude", r: "intensity", sort: {channel: "r"}}) |
19 | 21 | ~~~
|
20 | 22 |
|
21 | 23 | The dot mark now sorts by descending radius by default to reduce occlusion.
|
22 | 24 |
|
23 |
| -The dotX, dotY, textX, and textY marks now support the **interval** option. |
24 |
| - |
25 |
| -Fix crash when using area shorthand (no options). |
| 25 | +The **zero** scale option (like the **nice** and **clamp** options) may now be specified as a top-level option, applying to all quantitative scales. |
26 | 26 |
|
27 | 27 | The rule mark now correctly respects the **dx** and **dy** options.
|
28 | 28 |
|
29 |
| -Improve performance of internal array operations and type coercion. |
| 29 | +Fix crash when using area mark shorthand. |
| 30 | + |
| 31 | +Marks can now define a channel hint to set the default range of the *r* scale. This is used by the hexbin transform when producing an *r* output channel. |
| 32 | + |
| 33 | +Improve performance of internal array operations, including type coercion. |
| 34 | + |
| 35 | +[breaking] Color scales with diverging color schemes now default to the *diverging* scale type instead of the *linear* scale type. |
| 36 | + |
| 37 | +[breaking] *mark*.initialize return signature. |
30 | 38 |
|
31 | 39 | ## 0.4.3
|
32 | 40 |
|
|
0 commit comments