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
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -722,6 +722,8 @@ The rectangular marks ([bar](#bar), [cell](#cell), and [rect](#rect)) support in
722
722
723
723
Insets are specified in pixels. Corner radii are specified in either pixels or percentages (strings). Both default to zero. Insets are typically used to ensure a one-pixel gap between adjacent bars; note that the [bin transform](#bin) provides default insets, and that the [band scale padding](#position-options) defaults to 0.1, which also provides separation.
724
724
725
+
For marks that support the <aname="frameanchor">**frameAnchor**</a> option, it may be specified as one of the four sides (*top*, *right*, *bottom*, *left*), one of the four corners (*top-left*, *top-right*, *bottom-right*, *bottom-left*), or the *middle* of the frame.
726
+
725
727
#### *mark*.plot(*options*)
726
728
727
729
Given a *mark*, such as the result of calling [Plot.barY](#plotbarydata-options), you can call *mark*.plot to render a plot. This is [shorthand](https://observablehq.com/@observablehq/plot-shorthand?collection=@observablehq/plot) for calling [Plot.plot](#plotplotoptions) where the *marks* option specifies this single mark.
@@ -1001,7 +1003,7 @@ The following dot-specific constant options are also supported:
1001
1003
* **r** - the effective radius (length); a number in pixels
1002
1004
* **rotate** - the rotation angle in degrees clockwise; defaults to 0
1003
1005
* **symbol** - the categorical symbol; defaults to circle
1004
-
* **frameAnchor** - the frame anchor; top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, or middle (default)
1006
+
* **frameAnchor** - the [frame anchor](#frameanchor); defaults to *middle*
1005
1007
1006
1008
The **r** option can be specified as either a channel or constant. When the radius is specified as a number, it is interpreted as a constant; otherwise it is interpreted as a channel. The radius defaults to 4.5 pixels when using the **symbol** channel, and otherwise 3 pixels. Dots with a nonpositive radius are not drawn.
1007
1009
@@ -1054,7 +1056,7 @@ The **width** and **height** options default to 16 pixels and can be specified a
1054
1056
1055
1057
The following image-specific constant options are also supported:
1056
1058
1057
-
* **frameAnchor** - the frame anchor; top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, or middle (default)
1059
+
* **frameAnchor** - the [frame anchor](#frameanchor); defaults to *middle*
1058
1060
* **preserveAspectRatio** - the [aspect ratio](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio); defaults to “xMidYMid meet”
1059
1061
* **crossOrigin** - the [cross-origin](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/crossorigin) behavior
1060
1062
@@ -1282,7 +1284,7 @@ The following text-specific constant options are also supported:
1282
1284
* **fontStyle** - the [font style](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style); defaults to normal
1283
1285
* **fontVariant** - the [font variant](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant); defaults to normal
1284
1286
* **fontWeight** - the [font weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight); defaults to normal
1285
-
* **frameAnchor** - the frame anchor; top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, or middle (default)
1287
+
* **frameAnchor** - the [frame anchor](#frameanchor); defaults to *middle*
1286
1288
* **rotate** - the rotation angle in degrees clockwise; defaults to 0
1287
1289
1288
1290
If a **lineWidth** is specified, input text values will be wrapped as needed to fit while preserving existing newlines. The line wrapping implementation is rudimentary; for non-ASCII, non-U.S. English text, or for when a different font is used, you may get better results by hard-wrapping the text yourself (by supplying newlines in the input). If the **monospace** option is truthy, the default **fontFamily** changes to “ui-monospace, monospace”, and the **lineWidth** option is interpreted as characters (ch) rather than ems.
@@ -1363,7 +1365,7 @@ If either of the **x** or **y** channels are not specified, the corresponding po
1363
1365
The following options are also supported:
1364
1366
1365
1367
* **anchor** - one of *start*, *middle*, or *end*; defaults to *middle*
1366
-
* **frameAnchor** - the frame anchor; top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, or middle (default)
1368
+
* **frameAnchor** - the [frame anchor](#frameanchor); defaults to *middle*
1367
1369
1368
1370
If the **anchor** is *start*, the arrow will start at the given *xy* position and point in the direction given by the rotation angle. If the **anchor** is *end*, the arrow will maintain the same orientation, but be positioned such that it ends in the given *xy* position. If the **anchor** is *middle*, the arrow will be likewise be positioned such that its midpoint intersects the given *xy* position.
0 commit comments