Skip to content

Commit d5c3d06

Browse files
committed
Update CHANGELOG
1 parent 575fd3d commit d5c3d06

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,29 @@ The new [hexgrid decoration mark](./README.md#hexgrid) draws a hexagonal grid. I
3131

3232
The new [dodge transform](./README.md#dodge) 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.
3333

34+
<img src="./img/dodge.png" width="640" alt="a chart showing the monthly percent change in travel by U.S. county in March 2020 after the coronavirus outbreak; each county is represented as a circle with area proportional to its population, positioned according to the change in travel; most counties, and especially those with stay-at-home orders, show a significant reduction in travel">
35+
36+
```js
37+
Plot.plot({
38+
height: 400,
39+
x: {
40+
domain: [-100, -20],
41+
percent: true,
42+
label: "← Reduction in travel (%)"
43+
},
44+
r: {
45+
range: [0, 20]
46+
},
47+
color: {
48+
legend: true,
49+
tickFormat: d => d ? "lockdown" : "no lockdown"
50+
},
51+
marks: [
52+
Plot.dot(lockdown, Plot.dodgeY("middle", {x: "pct_change", r: "pop", fill: "in_lockdown"}))
53+
]
54+
})
55+
```
56+
3457
[breaking] Color scales with diverging color schemes now default to the *diverging* scale type instead of the *linear* scale type. This includes the *brbg*, *prgn*, *piyg*, *puor*, *rdbu*, *rdgy*, *rdylbu*, *rdylgn*, *spectral*, *burd*, and *buylrd* schemes. If you want to use a diverging color scheme with a linear color scale, set the scale **type** to *linear*. Color scales will also default to diverging if the scale **pivot** option is set. (For diverging scales, the **pivot** option defaults to zero.)
3558

3659
The **sort** transform option now supports sorting on an existing channel, avoiding the need to duplicate the channel definition. For example, to sort dots by ascending radius:

img/dodge.png

178 KB
Loading

0 commit comments

Comments
 (0)