JuliaPlots / JuliaPlots/PlotlyJS.jl
The State of PlotlyJS + WebIO/JupyterLab
- Dominant language
- Julia
- Stars
- 444
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
PlotlyJS tries to access the global WebIO object - but it can't since that's not defined in JupyterLab (because JupyterLab opens multiple notebooks in one Javascript context and doing so leads to "cross-talk").
This works (everywhere, but notably in JupyterLab):
```julia
trace1 = scatter(x=1:4, y=[10, 15, 13, 17], mode="markers")
plot([trace1])
```
This does NOT work (in JupyterLab):
```julia
using Interact
@manipulate for m in [1, 2, 3]
x = range(1, stop=5, length=5)
trace1 = scatter(x=x, y=m*x, mode="markers")
plot([trace1])
end
```
There are two ways to fix this.
* **Easy:** Define a global PlotlyJS object to define commands on.
* **Hard(er):** Figure out a good API for WebIO to forward "libraries" over to the client.
We've discussed the latter API (in part of a discussion about making RPC's from JS into Julia) [here (second comment)](https://github.com/JuliaGizmos/WebIO.jl/issues/216#issuecomment-440305238). I'm not sure what the timeframe is on that though; we (well mostly @shashi at this point) are currently trying to implement request-response messaging which would be a pre-req.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.