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
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -808,6 +808,12 @@ Insets are specified in pixels. Corner radii are specified in either pixels or p
808
808
809
809
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.
810
810
811
+
The <aname="facetanchor">**facetAnchor**</a> option supports the following settings:
812
+
* null - display the mark on each non-empty facet (default for all marks, with the exception of axis marks)
813
+
**top*, *right*, *bottom*, or *left* - display the mark on facets on the specified side
814
+
**top-empty*, *right-empty*, *bottom-empty*, or *left-empty* - display the mark on facets that have an empty space on the specified side (the empty space being either the margin, or an empty facet); this is the default for axis marks
815
+
816
+
811
817
#### *mark*.plot(*options*)
812
818
813
819
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.
@@ -973,16 +979,22 @@ When you need more control, you can add axis and grid marks explicitly in the ma
Returns a new axis with the given *data* and *options*.
985
+
Returns a new axis with the given *data* and *options* for the *x* scale.
980
986
981
987
The optional *data* is an array of tick values—it defaults to the scale’s ticks.
982
988
983
-
The axis options described in [position options](#position-options) are all supported, except the **grid** option which is handled by the [grid](#grid) mark. The *axis* option, in this context, is called **anchor** and is one of *top* or *bottom*. The **color** option controls both **stroke** for the ticks, and the **fill** for labels.
989
+
The axis options described in [position options](#position-options) are all supported, except the **grid** option which is handled by the [grid](#grid) mark. The **y** channel, if any, describes the vertical position of the tick and defaults to the axis anchor.
990
+
991
+
The **axis** option, in this context, is called **anchor** and is one of *top* or *bottom*.
992
+
993
+
The **color** option controls both **stroke** for the ticks, and the **fill** for labels. It defaults to currentColor.
994
+
995
+
The (rarely used) text label’s stroke is controlled by the **textStroke**,**textStrokeOpacity**, and **textStrokeWidth** options.
984
996
985
-
The **y** channel, if any, describes the vertical position of the tick. Defaults to the axis anchor.
997
+
The **facetAnchor** option defaults to *bottom-empty* if anchor is bottom, and *top-empty* if anchor is top. This ensures the proper positioning of the axes with respect to empty facets.
0 commit comments