You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In offline mode, the plotly.min.js file is being injected with a reference to the local filesystem. Since Pluto is served over http://localhost, the file:/// paths can't be loaded. (Note that Pluto static exports do work with the offline mode, since both the HTML file and the Plotly file are served over file:/// and there is no protocol mismatch).
A fix could be to follow what PlutoPlotly does and inject the library files into the Pluto frontend distribution files, which are being served over http when Pluto is running:
I discussed this with @pankgeorg today, while PlutoPlotly.jl injects files into Pluto's source code, I don't think this is a good pattern, there are some alternatives that are more stable and also work in Static HTML export files, like using a data: URL instead of file:.
Details
In offline mode, the
plotly.min.js
file is being injected with a reference to the local filesystem. Since Pluto is served overhttp://localhost
, thefile:///
paths can't be loaded. (Note that Pluto static exports do work with the offline mode, since both the HTML file and the Plotly file are served overfile:///
and there is no protocol mismatch).A fix could be to follow what PlutoPlotly does and inject the library files into the Pluto frontend distribution files, which are being served over http when Pluto is running:
https://github.com/JuliaPluto/PlutoPlotly.jl/blob/8c46e64be948899059722b74b101478c83326534/src/local_plotly_library.jl#L62-L69
and
https://github.com/JuliaPluto/PlutoPlotly.jl/blob/8c46e64be948899059722b74b101478c83326534/src/show.jl#L24-L32
Backends
Plotly
This bug occurs on ( insert
x
below )Versions
Plots.jl version: Plots v1.39.0
Backend version (
]st -m <backend(s)>
): -Output of
versioninfo()
:The text was updated successfully, but these errors were encountered: