|
1 | 1 | import type {InsetOptions} from "../inset.js";
|
2 | 2 | import type {MarkOptions, RenderableMark} from "../mark.js";
|
3 | 3 |
|
| 4 | +/** Options for the frame decoration mark. */ |
4 | 5 | export interface FrameOptions extends MarkOptions, InsetOptions {
|
| 6 | + /** |
| 7 | + * If null (default), the rectangular outline of the frame is drawn; otherwise |
| 8 | + * the frame is drawn as a line only on the given side, and the **rx**, |
| 9 | + * **ry**, **fill**, and **fillOpacity** options are ignored. |
| 10 | + */ |
5 | 11 | anchor?: "top" | "right" | "bottom" | "left" | null;
|
| 12 | + |
| 13 | + /** |
| 14 | + * The rounded corner [*x*-radius][1], either in pixels or as a percentage of |
| 15 | + * the frame width. If **rx** is not specified, it defaults to **ry** if |
| 16 | + * present, and otherwise draws square corners. |
| 17 | + * |
| 18 | + * [1]: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/rx |
| 19 | + */ |
6 | 20 | rx?: number | string;
|
| 21 | + |
| 22 | + /** |
| 23 | + * The rounded corner [*y*-radius[1], either in pixels or as a percentage of |
| 24 | + * the frame height. If **ry** is not specified, it defaults to **rx** if |
| 25 | + * present, and otherwise draws square corners. |
| 26 | + * |
| 27 | + * [1]: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/ry |
| 28 | + */ |
7 | 29 | ry?: number | string;
|
8 | 30 | }
|
9 | 31 |
|
| 32 | +/** |
| 33 | + * Draws a rectangle around the plot’s frame, or if an **anchor** is given, a |
| 34 | + * line on the given side. Useful for visual separation of facets, or in |
| 35 | + * conjunction with axes and grids to fill the frame’s background. |
| 36 | + */ |
10 | 37 | export function frame(options?: FrameOptions): Frame;
|
11 | 38 |
|
| 39 | +/** The frame decoration mark. */ |
12 | 40 | export class Frame extends RenderableMark {}
|
0 commit comments