|
2 | 2 |
|
3 | 3 | Year: **Current (2023)** · [2022](./CHANGELOG-2022.md) · [2021](./CHANGELOG-2021.md)
|
4 | 4 |
|
| 5 | +## 0.6.9 |
| 6 | + |
| 7 | +[Released June 27, 2023.](https://github.com/observablehq/plot/releases/tag/v0.6.9) |
| 8 | + |
| 9 | +Time [axes](https://observablehq.com/plot/marks/axis) now default to multi-line ticks, greatly improving readability. When a tick has the same second field value as the previous tick (*e.g.*, “19 Jan” after “17 Jan”), only the first field (“19”) is shown for brevity. The tick format is now based on the tick interval and hence is always consistent, whereas the prior “multi-scale” format varied based on the date, such as “Jan 29” (for Sunday, January 29) and “Tue 31” (for Tuesday, January 31). The new ticks are similar to [Datawrapper](https://blog.datawrapper.de/new-axis-ticks/). |
| 10 | + |
| 11 | +Before:<br> |
| 12 | +<img src="./img/time-axis-before.png" width="640" alt="A horizontal time axis showing dates “Wed 25”, “Fri 27”, “Jan 29”, “Tue 31”, and so on."> |
| 13 | + |
| 14 | +After:<br> |
| 15 | +<img src="./img/time-axis-after.png" width="640" alt="A horizontal time axis showing dates “17 Jan”, “19”, “21”, through “2 Feb”, “4”, and so on. When the month name is shown, it is on a second line below the date."> |
| 16 | + |
| 17 | +It is now easier to construct a “piecewise” [continuous scale](https://observablehq.com/plot/features/scales#continuous-scales) with more than two elements in the **domain** or **range**. This is most often used for a custom color scheme interpolating through fixed colors, such as this pleasing rainbow (sometimes used by artist [Dave Whyte](https://beesandbombs.com/), *a.k.a.* beesandbombs). |
| 18 | + |
| 19 | +<img src="./img/piecewise-rainbow.png" width="640" alt="A one-dimensional cell plot of the numbers 0 through 39, laid out horizontally, with color varying smoothly through red, yellow, green-blue, and purple."> |
| 20 | + |
| 21 | +```js |
| 22 | +Plot.plot({ |
| 23 | + color: { |
| 24 | + type: "linear", |
| 25 | + range: ["#d70441", "#f4e904", "#009978", "#5e3688"] |
| 26 | + }, |
| 27 | + marks: [ |
| 28 | + Plot.cellX(d3.range(40), {fill: Plot.identity}) |
| 29 | + ] |
| 30 | +}) |
| 31 | +``` |
| 32 | + |
| 33 | +The [tree mark](https://observablehq.com/plot/marks/tree) now supports a **textLayout** option, which defaults to *mirrored* to alternate the orientation of labels for internal (non-leaf) *vs.* external (leaf) nodes. The treeNode and treeLink marks now also support a new **treeFilter** option, allowing these marks to be filtered without affecting the tree layout. |
| 34 | + |
| 35 | +<img src="./img/tree-gods.png" width="640" alt="A small family tree diagram of Greek gods. Chaos beget Eros, Erebus, Tartarus, and Gaia; Gaia beget Mountains, Pontus, and Uranus."> |
| 36 | + |
| 37 | +```js |
| 38 | +Plot.plot({ |
| 39 | + axis: null, |
| 40 | + height: 100, |
| 41 | + margin: 10, |
| 42 | + marginLeft: 40, |
| 43 | + marginRight: 120, |
| 44 | + marks: [ |
| 45 | + Plot.tree(gods, {textStroke: "white"}) |
| 46 | + ] |
| 47 | +}) |
| 48 | +``` |
| 49 | + |
| 50 | +The [barycentric interpolator](https://observablehq.com/plot/marks/raster#interpolatorbarycentric-options) used by the [raster](https://observablehq.com/plot/marks/raster) and [contour](https://observablehq.com/plot/marks/contour) marks now behaves correctly outside the convex hull of samples. The new algorithm (below right) radiates outwards from the hull, ensuring a continuous image; the old algorithm (below left) radiated inwards from values imputed on the frame’s edges, producing discontinuities. |
| 51 | + |
| 52 | +<img src="./img/barycentric-before-after.png" width="640" alt="A before-and-after comparison of the barycentric interpolator applied to three sample points; in the new algorithm, lines radiate outward perpendicular from the triangle’s sides, producing a more coherent and understandable image."> |
| 53 | + |
| 54 | +The [tip mark](https://observablehq.com/plot/marks/tip) now automatically sets the pointer-events attribute to *none* when associated with the [pointer transform](https://observablehq.com/plot/interactions/pointer) when the the pointer is not sticky, as when hovering a chart without clicking to lock the pointer. This prevents the tip mark from interfering with interaction on other marks, such as clickable links. |
| 55 | + |
| 56 | +The [auto mark](https://observablehq.com/plot/marks/auto) now renders as a cell, instead of a degenerate invisible rect, when **x** and **y** are both ordinal and the **mark** option is set to *bar*. The [tree mark](https://observablehq.com/plot/marks/tree) no longer produces duplicate tips with the **tip** option. The [rule mark](https://observablehq.com/plot/marks/rule) now respects the top-level **document** option, if any, when using the **clip** option. The [axis mark](https://observablehq.com/plot/marks/axis) now correctly handles the **sort**, **filter**, **reverse**, and **initializer** options. |
| 57 | + |
| 58 | +The **title**, **ariaLabel**, and **href** channels no longer filter by default; these channels may now be sparsely defined and the associated mark instance will still render. |
| 59 | + |
| 60 | +The [pointer transform](https://observablehq.com/plot/interactions/pointer) now handles non-faceted marks in faceted plots. The [window transform](https://observablehq.com/plot/transforms/window)’s *median*, *deviation*, *variance*, and percentile reducers have been fixed. |
| 61 | + |
5 | 62 | ## 0.6.8
|
6 | 63 |
|
7 | 64 | [Released June 2, 2023.](https://github.com/observablehq/plot/releases/tag/v0.6.8)
|
|
0 commit comments