Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaleido uses the same plotlyjs as PlotlyJS #488

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ JSExpr = "0.5, 1"
JSON = "0.20, 0.21"
JSON3 = "1"
PlotlyBase = "0.8.15"
PlotlyKaleido = "2"
PlotlyKaleido = "2.2.5"
Reexport = "0.2, 1"
Requires = "1.0"
WebIO = "0.8"
Expand Down
12 changes: 6 additions & 6 deletions src/PlotlyJS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ function __init__()
@warn("Warnings were generated during the last build of PlotlyJS: please check the build log at $_build_log")
end

if ccall(:jl_generating_output, Cint, ()) != 1
# ensure precompilation of packages depending on PlotlyJS finishes
PlotlyKaleido.start()
end

if !isfile(_js_path)
@info("plotly.js javascript libary not found -- downloading now")
@info("plotly.js javascript library not found -- downloading now")
include(joinpath(_pkg_root, "deps", "build.jl"))
end

if ccall(:jl_generating_output, Cint, ()) != 1
# ensure precompilation of packages depending on PlotlyJS finishes
PlotlyKaleido.start(plotlyjs=_js_path)
end

# set default renderer
# First check env var
Expand Down
2 changes: 1 addition & 1 deletion src/kaleido.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function savefig(
return fn
end

_ensure_kaleido_running() = !is_running() && restart()
_ensure_kaleido_running(; kwargs...) = !is_running() && restart(; plotlyjs=_js_path, kwargs...)

const _KALEIDO_MIMES = Dict(
"application/pdf" => "pdf",
Expand Down
Loading