Skip to content

Commit 07ed53d

Browse files
committed
Update README
1 parent 8ef1e7f commit 07ed53d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ These options determine the overall layout of the plot; all are specified as num
8888
* **margin** - shorthand for the four margins
8989
* **width** - the outer width of the plot (including margins)
9090
* **height** - the outer height of the plot (including margins)
91-
* **document** - the [document](https://developer.mozilla.org/en-US/docs/Web/API/Document) used to create plot elements; defaults to window.document
9291

9392
The default **width** is 640. On Observable, the width can be set to the [standard width](https://github.com/observablehq/stdlib/blob/main/README.md#width) to make responsive plots. The default **height** is chosen automatically based on the plot’s associated scales; for example, if *y* is linear and there is no *fy* scale, it might be 396.
9493

@@ -117,6 +116,8 @@ Plot.plot({
117116

118117
The generated SVG element has a random class name which applies a default stylesheet. Use the top-level **className** option to specify that class name.
119118

119+
The **document** option specifies the [document](https://developer.mozilla.org/en-US/docs/Web/API/Document) used to create plot elements. It defaults to window.document, but can be changed to another document, way when using a virtual DOM library for server-side rendering in Node.
120+
120121
### Scale options
121122

122123
Plot passes data through [scales](https://observablehq.com/@observablehq/plot-scales) as needed before rendering marks. A scale maps abstract values such as time or temperature to visual values such as position or color. Within a given plot, marks share scales. For example, if a plot has two Plot.line marks, both share the same *x* and *y* scales for a consistent representation of data. (Plot does not currently support dual-axis charts, which are [not advised](https://blog.datawrapper.de/dualaxis/).)

0 commit comments

Comments
 (0)