@@ -9,11 +9,11 @@ export interface PlotOptions extends ScaleDefaults {
9
9
10
10
/**
11
11
* The outer width of the plot in pixels, including margins. Defaults to 640.
12
- * On Observable, this can be set to the built-in
13
- * [width](https://github.com/observablehq/stdlib/blob/main/README.md# width)
14
- * for full-width responsive plots. Note: the default style has a max- width of
15
- * 100%; the plot will automatically shrink to fit even when a fixed width is
16
- * specified.
12
+ * On Observable, this can be set to the built-in [width][1] for full-width
13
+ * responsive plots. Note: the default style has a max- width of 100%; the plot
14
+ * will automatically shrink to fit even when a fixed width is specified.
15
+ *
16
+ * [1]: https://github.com/observablehq/stdlib/blob/main/README.md#width
17
17
*/
18
18
width ?: number ;
19
19
@@ -77,27 +77,27 @@ export interface PlotOptions extends ScaleDefaults {
77
77
/**
78
78
* Custom styles to override Plot’s defaults. Styles may be specified either
79
79
* as a string of inline styles (*e.g.*, `"color: red;"`, in the same fashion
80
- * as assigning
81
- * [*element*.style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style))
82
- * or an object of properties (*e.g.*, `{color: "red"}`, in the same fashion
83
- * as assigning [*element*.style
84
- * properties](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration)).
85
- * Note that unitless numbers ([quirky
86
- * lengths](https://www.w3.org/TR/css-values-4/#deprecated-quirky-length))
87
- * such as `{padding: 20}` may not supported by some browsers; you should
88
- * instead specify a string with units such as `{padding: "20px"}`. By
89
- * default, the returned plot has a white background, a max-width of 100%, and
90
- * the system-ui font. Plot’s marks and axes default to
91
- * [currentColor](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword),
92
- * meaning that they will inherit the surrounding content’s color. For
93
- * example, a dark theme:
80
+ * as assigning [*element*.style][1]) or an object of properties (*e.g.*,
81
+ * `{color: "red"}`, in the same fashion as assigning [*element*.style
82
+ * properties][2]). Note that unitless numbers ([quirky lengths][3]) such as
83
+ * `{padding: 20}` may not supported by some browsers; you should instead
84
+ * specify a string with units such as `{padding: "20px"}`. By default, the
85
+ * returned plot has a white background, a max-width of 100%, and the
86
+ * system-ui font. Plot’s marks and axes default to [currentColor][4], meaning
87
+ * that they will inherit the surrounding content’s color. For example, a dark
88
+ * theme:
94
89
*
95
90
* ```js
96
91
* Plot.plot({
97
92
* style: "background: black; color: white;",
98
93
* marks: …
99
94
* })
100
95
* ```
96
+ *
97
+ * [1]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
98
+ * [2]: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration
99
+ * [3]: https://www.w3.org/TR/css-values-4/#deprecated-quirky-length
100
+ * [4]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword
101
101
*/
102
102
style ?: string | Partial < CSSStyleDeclaration > | null ;
103
103
@@ -110,39 +110,41 @@ export interface PlotOptions extends ScaleDefaults {
110
110
/**
111
111
* The figure caption. If present, Plot wraps the generated SVG element in an
112
112
* HTML figure element with a figcaption, returning the figure. To specify an
113
- * HTML caption, consider using the [`html` tagged template
114
- * literal](http://github.com/observablehq/htl); otherwise, the specified
115
- * string represents text that will be escaped as needed.
113
+ * HTML caption, consider using the [`html` tagged template literal][1];
114
+ * otherwise, the specified string represents text that will be escaped as
115
+ * needed.
116
116
*
117
117
* ```js
118
118
* Plot.plot({
119
119
* caption: html`Figure 1. This chart has a <i>fancy</i> caption.`,
120
120
* marks: …
121
121
* })
122
122
* ```
123
+ *
124
+ * [1]: https://github.com/observablehq/htl
123
125
*/
124
126
caption ?: string | Node | null ;
125
127
126
128
/**
127
- * The [aria-label
128
- * attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)
129
- * on the SVG root.
129
+ * The [aria-label attribute][1] on the SVG root.
130
+ *
131
+ * [1]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label
130
132
*/
131
133
ariaLabel ?: string | null ;
132
134
133
135
/**
134
- * The [aria-description
135
- * attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-description)
136
- * on the SVG root.
136
+ * The [aria-description attribute][1] on the SVG root.
137
+ *
138
+ * [1]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-description
137
139
*/
138
140
ariaDescription ?: string | null ;
139
141
140
142
/**
141
- * The owner
142
- * [Document](https://developer.mozilla.org/en-US/docs/Web/API/Document) used
143
- * to create DOM elements. Defaults to window.document, but can be changed to
144
- * another document, say when using a virtual DOM library for server-side
145
- * rendering in Node.
143
+ * The owner [Document][1] used to create DOM elements. Defaults to
144
+ * window.document, but can be changed to another document, say when using a
145
+ * virtual DOM library for server-side rendering in Node.
146
+ *
147
+ * [1]: https://developer.mozilla.org/en-US/docs/Web/API/Document
146
148
*/
147
149
document ?: Document ;
148
150
@@ -184,10 +186,11 @@ export interface PlotOptions extends ScaleDefaults {
184
186
* first quartile of values has a radius of 3 pixels, but no value has a
185
187
* radius greater than 30 pixels.
186
188
*
187
- * Plot does not currently implement a radius legend; see
188
- * [#236](https://github.com/observablehq/plot/issues/236). We recommend
189
- * either implementing one manually or labeling points so that values can be
190
- * read directly from the plot.
189
+ * Plot does not currently implement a radius legend; see [#236][1]. We
190
+ * recommend either implementing one manually or labeling points so that
191
+ * values can be read directly from the plot.
192
+ *
193
+ * [1]: https://github.com/observablehq/plot/issues/236
191
194
*/
192
195
r ?: ScaleOptions ;
193
196
0 commit comments