Skip to content

Commit 932f24f

Browse files
committed
Update CHANGELOG
1 parent 5f04742 commit 932f24f

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@
44

55
*Not yet released. These are forthcoming changes in the main branch.*
66

7-
The [area](./README.md#area) and [line marks](./README.md#line) now support varying color and other aesthetics, such as stroke width, within series. For example, this chart of unemployment rates by metro area highlights increases in red and decreases in blue using a window transform.
7+
The [area](./README.md#area) and [line marks](./README.md#line) now support varying fill, stroke, title, and other aesthetics within series. For example, this chart of unemployment rates by metro area highlights increases in red and decreases in blue using a window transform.
88

9-
<img src="./img/line-slope.png" width="660" alt="a line chart of unemployment rates by metro area; increases are shown in red, and decreases in blue">
9+
<img src="./img/line-slope.png" width="640" alt="a line chart of unemployment rates by metro area; increases are shown in red, and decreases in blue">
1010

1111
```js
1212
Plot.line(bls, Plot.map({stroke: Plot.window({k: 2, reduce: "difference"})}, {x: "date", y: "unemployment", z: "division", stroke: "unemployment"}))
1313
```
1414

15+
The new *clip* mark option enables clipping to the plot frame. For example, this can be used to clip overlapping areas and produce a horizon chart of hourly traffic patterns.
16+
17+
<img src="./img/horizon.png" width="640" alt="a horizon chart of unemployment rates by metro area; increases are shown in red, and decreases in blue">
18+
19+
```js
20+
d3.ticks(0, max, bands).map(t => Plot.areaY(traffic, {x: "date", y: d => d.value - t, fill: () => t, clip: true}))
21+
```
22+
23+
Warnings…
24+
1525
The [text mark](./README.md#text) now supports automatic wrapping! The new **lineWidth** option specifies the desired length of a line in ems. The line breaking, wrapping, and text metrics implementations are all rudimentary, but they should be acceptable for text that is mostly ASCII. (For more control, you can hard-wrap text manually.) The **monospace** option now provides convenient defaults for monospaced text.
1626

1727
Plot now supports ARIA attributes for improved accessibility: aria-label, aria-description, aria-hidden. The top-level **ariaLabel** and **ariaDescription** options apply to the root SVG element. The new **ariaLabel** and **ariaDescription** scale options apply to axes; the label defaults to *e.g.* “y-axis” and the description defaults to the scale’s label (*e.g.*, “↑ temperature”). Marks define a group-level aria-label (*e.g.*, “dot”). There is also an optional **ariaLabel** channel for labeling data (*e.g.*, “E 12.7%”), and a group-level **ariaDescription** option for a human-readable description. The **ariaHidden** mark option allows the hiding of decorative elements from the accessibility tree.
@@ -20,15 +30,15 @@ The line and link marks now support [marker options](./README.md#markers) for dr
2030

2131
The new **paintOrder** mark option controls the [paint order](https://developer.mozilla.org/en-US/docs/Web/CSS/paint-order). The text mark’s paint order now defaults to *stroke*, with a stroke width of 3px and a stroke linejoin of *round*, making it easier to create a halo for separating labels from a busy background, improving legibility.
2232

23-
The *fill* and *stroke* mark options can now be expressed as patterns or gradients using funciri color definitions, *e.g.* “url(#pattern)”. All marks now support the *strokeDashoffset* option (for use with *strokeDasharray*).
33+
The *fill* and *stroke* mark options can now be expressed as patterns or gradients using funciri color definitions, *e.g.* “url(#pattern)”. Likewise, colors can also be expressed as CSS variables, *e.g.*, “var(--blue)”. All marks now support the *strokeDashoffset* option (for use with *strokeDasharray*).
2434

2535
When a color scale is associated exclusively with boolean values (true and false), a smarter default range is now chosen: light gray for false, and dark gray for true. Light and dark colors from different sequential schemes, such as *reds*, can be specified via the *scheme* option.
2636

2737
The bin transform now supports the *interval* option, allowing numeric intervals such as integer binning with a nice default domain that aligns with interval boundaries. (The bin transform already supported time intervals as the *thresholds* option; time intervals can now also be specified as the *interval* option.)
2838

2939
The returned scale object now exposes *bandwidth* and *step* values for *band* and *point* scales.
3040

31-
Fix a crash in default tuple accessors for *x* and *y* when data is undefined. Fix a bug where “none” with surrounding whitespace or capital letters would not be recognized as a valid color. When a channel is specified as a boolean value (*e.g.*, `fill: true`), it is now considered a constant value rather than undefined. Fix a bug where an identity color legend would be rendered as the text “undefined” instead of showing nothing. The vector mark now respects the *frameAnchor* option.
41+
Fix a crash in default tuple accessors for *x* and *y* when data is undefined. Fix a bug where “none” with surrounding whitespace or capital letters would not be recognized as a valid color. When a channel is specified as a boolean value (*e.g.*, `fill: true`), it is now considered a constant value rather than undefined. Fix a bug where an identity color legend would be rendered as the text “undefined” instead of showing nothing. If scale options are declared, but the scale has no defined type, domain, or data, a scale is no longer constructed rather than a default linear scale. The vector mark now respects the *frameAnchor* option.
3242

3343
## 0.4.0
3444

img/horizon.png

137 KB
Loading

0 commit comments

Comments
 (0)