Skip to content

Commit 2f351a7

Browse files
committed
Document dx, dy in CHANGELOG; fix README: the 0.5 offset is used for *low*-density screens, not high-density.
1 parent 07cf90b commit 2f351a7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
*Not yet released.* These notes are a work in progress.
66

7+
8+
### Marks
9+
10+
The constant *dx* and *dy* options have been extended to all marks, allowing to shift the mark by *dx* pixels horizontally and *dy* pixels vertically. Since only text elements accept the dx and dy properties, in all the other marks these are rendered as a transform (2D transformation) property of the mark’s parent, possibly including a 0.5px offset on low-density screens.
11+
712
### Scales
813

914
Quantitative scales, as well as identity position scales, now coerce channel values to numbers; both null and undefined are coerced to NaN. Similarly, time scales coerce channel values to dates; numbers are assumed to be milliseconds since UNIX epoch, while strings are assumed to be in [ISO 8601 format](https://github.com/mbostock/isoformat/blob/main/README.md#parsedate-fallback).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ All marks support the following style options:
514514
* **dx** - horizontal offset (in pixels; defaults to 0)
515515
* **dy** - vertical offset (in pixels; defaults to 0)
516516

517-
For all marks except [text](#plottextdata-options), the **dx** and **dy** options are rendered as a transform property, possibly including a 0.5px offset on high-density screens.
517+
For all marks except [text](#plottextdata-options), the **dx** and **dy** options are rendered as a transform property, possibly including a 0.5px offset on low-density screens.
518518

519519
All marks support the following optional channels:
520520

0 commit comments

Comments
 (0)