Skip to content

Commit 45fee8e

Browse files
committed
Update CHANGELOG
1 parent 8d2d1b3 commit 45fee8e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66

77
The new top-level **aspectRatio** option changes the default plot **height** such that, assuming both *x* and *y* are *linear* scales, a scaled unit distance in *x* is the given aspect ratio times a scaled unit distance in *y*. For example, if *x* and *y* represent the same units (kilometers, say, or degrees Celsius, or seconds), and if the **aspectRatio** is one, then scaled distances in *x* and *y* will be equivalent.
88

9+
<img src="./img/aspect-ratio.webp" width="650" alt="A scatterplot of daily temperature variation (y) vs. daily low temperature (x).">
10+
11+
```js
12+
Plot.plot({
13+
aspectRatio: 1,
14+
grid: true,
15+
x: {label: "Daily low temperature (°F) →", tickSpacing: 40},
16+
y: {label: "↑ Daily temperature variation (Δ°F)", tickSpacing: 40},
17+
color: {scheme: "rainbow", legend: true, tickFormat: Plot.formatMonth()},
18+
marks: [
19+
Plot.ruleY([0]),
20+
Plot.dot(weather, {fill: (d) => d.date.getUTCMonth(), x: "temp_min", y: (d) => d.temp_max - d.temp_min})
21+
]
22+
})
23+
```
24+
925
The new **textOverflow** option for the text mark allows text to be truncated when a line of text is longer than the specified **lineWidth**. Overflowing characters can either be clipped (*clip*) or replaced with an ellipsis (*ellipsis*), either at the start, middle, or end of each line. When wrapping or truncating, the text mark now more accurately estimates the width of ellipses and emojis, and no longer separates combining marks or emoji character sequences.
1026

1127
The link mark now respects the current **projection**, if any, given the default **curve** of *auto*. This matches the behavior of the line mark. To opt-out of the projection and draw a straight line, set the **curve** to *linear*.

img/aspect-ratio.webp

64.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)