Skip to content

Commit b636460

Browse files
committed
docs
1 parent c50ee9f commit b636460

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/PlotlyLight.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,18 @@ src!(x::Symbol) = (x in src_opts || error("src must be one of: $src_opts"); Defa
4848

4949
#-----------------------------------------------------------------------------# Plot
5050
"""
51-
Plot(data, layout, config)
51+
Plot(data, layout, config; id, js)
5252
5353
- A Plotly.js plot with components `data`, `layout`, and `config`.
54-
- `data = Config()`: A `Config` (single trace) or `Vector{Config}` (multiple traces).
55-
- `layout = Config()`.
56-
- `config = Config(displaylogo=false, responsive=true)`.
54+
- `data = Config()`: A `Config` (single trace) or `Vector{Config}` (multiple traces).
55+
- `layout = Config()`.
56+
- `config = Config(displaylogo=false, responsive=true)`.
5757
- Each of the three components are converted to JSON via `JSON3.write`.
5858
- See the Plotly Javascript docs here: https://plotly.com/javascript/.
59+
- Keyword Args:
60+
- `id`: The `id` of the `<div>` the plot will be created in. Default: `randstring(10)`.
61+
- `js`: `Cobweb.Javascript` to add after the creation of the plot. Default:
62+
- `Cobweb.Javascript("console.log('plot created!')")`
5963
6064
### Example
6165

0 commit comments

Comments
 (0)