From 63b7c36365629d99c0273ab4afd5fb1458630662 Mon Sep 17 00:00:00 2001 From: Boyan Bejanov Date: Tue, 10 Sep 2024 10:10:18 -0400 Subject: [PATCH 1/2] Kaleido uses the same plotlyjs as PlotlyJS --- src/PlotlyJS.jl | 12 ++++++------ src/kaleido.jl | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PlotlyJS.jl b/src/PlotlyJS.jl index 3f60e31..79eb7c5 100644 --- a/src/PlotlyJS.jl +++ b/src/PlotlyJS.jl @@ -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 diff --git a/src/kaleido.jl b/src/kaleido.jl index 67fc288..49da826 100644 --- a/src/kaleido.jl +++ b/src/kaleido.jl @@ -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", From 286847a20f24f267f74383592f75c247281b78e8 Mon Sep 17 00:00:00 2001 From: Boyan Bejanov Date: Tue, 10 Sep 2024 10:26:26 -0400 Subject: [PATCH 2/2] Require PlotlyKaleido v2.2.5 or later --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index e74e8cc..6a24b8e 100644 --- a/Project.toml +++ b/Project.toml @@ -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"