Skip to content

Commit

Permalink
Kaleido uses the same plotlyjs as PlotlyJS (#488)
Browse files Browse the repository at this point in the history
* Kaleido uses the same plotlyjs as PlotlyJS

* Require PlotlyKaleido v2.2.5 or later
  • Loading branch information
bbejanov authored Sep 10, 2024
1 parent 75eacf4 commit 40caf9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
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

0 comments on commit 40caf9c

Please sign in to comment.