You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On all marks except text, dx, dy are rendered as a transform(translate) property, possibly with the 0.5px offset on high-density screens.
On text marks, the dx and dy properties are used.
closes#379
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -467,6 +467,10 @@ All marks support the following style options:
467
467
***strokeDasharray** - a comma-separated list of dash lengths (in pixels)
468
468
***mixBlendMode** - the [blend mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) (*e.g.*, *multiply*)
469
469
***shapeRendering** - the [shape-rendering mode](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering) (*e.g.*, *crispEdges*)
470
+
***dx** - horizontal offset; defaults to 0
471
+
***dy** - vertical offset; defaults to 0
472
+
473
+
For all marks except [text](#plottextdata-options), the **dx** and **dy** options are rendered as a translate(dx, dy) transform property, possibly including a 0.5 offset on high-density screens.
470
474
471
475
All marks support the following optional channels:
472
476
@@ -846,11 +850,9 @@ The following text-specific constant options are also supported:
846
850
***fontStyle** - the [font style](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style); defaults to normal
847
851
***fontVariant** - the [font variant](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant); defaults to normal
848
852
***fontWeight** - the [font weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight); defaults to normal
849
-
***dx** - the horizontal offset; defaults to 0
850
-
***dy** - the vertical offset; defaults to 0
851
853
***rotate** - the rotation in degrees clockwise; defaults to 0
852
854
853
-
The**dx** and **dy** options can be specified either as numbers representing pixels or as a string including units. For example, `"1em"` shifts the text by one [em](https://en.wikipedia.org/wiki/Em_(typography)), which is proportional to the **fontSize**. The **fontSize** and **rotate** options can be specified as either channels or constants. When fontSize or rotate is specified as a number, it is interpreted as a constant; otherwise it is interpreted as a channel.
855
+
For text marks, the**dx** and **dy** options can be specified either as numbers representing pixels or as a string including units. For example, `"1em"` shifts the text by one [em](https://en.wikipedia.org/wiki/Em_(typography)), which is proportional to the **fontSize**. The **fontSize** and **rotate** options can be specified as either channels or constants. When fontSize or rotate is specified as a number, it is interpreted as a constant; otherwise it is interpreted as a channel.
0 commit comments