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 and 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.
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
@@ -511,6 +511,10 @@ All marks support the following style options:
511
511
***strokeDasharray** - a comma-separated list of dash lengths (in pixels)
512
512
***mixBlendMode** - the [blend mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) (*e.g.*, *multiply*)
513
513
***shapeRendering** - the [shape-rendering mode](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering) (*e.g.*, *crispEdges*)
514
+
***dx** - horizontal offset; defaults to 0
515
+
***dy** - vertical offset; defaults to 0
516
+
517
+
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.
514
518
515
519
All marks support the following optional channels:
516
520
@@ -891,11 +895,9 @@ The following text-specific constant options are also supported:
891
895
***fontStyle** - the [font style](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style); defaults to normal
892
896
***fontVariant** - the [font variant](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant); defaults to normal
893
897
***fontWeight** - the [font weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight); defaults to normal
894
-
***dx** - the horizontal offset; defaults to 0
895
-
***dy** - the vertical offset; defaults to 0
896
898
***rotate** - the rotation in degrees clockwise; defaults to 0
897
899
898
-
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.
900
+
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