File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments