From 114cea53256fd3aa2b0c4c84b2afc71c8fc0c8d4 Mon Sep 17 00:00:00 2001 From: Allen Hill Date: Fri, 28 Oct 2022 20:25:42 -0400 Subject: [PATCH 1/2] Remove problematic IJulia.display_dict definition --- src/PlotlyJS.jl | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/PlotlyJS.jl b/src/PlotlyJS.jl index 9d3e514e..953dca61 100644 --- a/src/PlotlyJS.jl +++ b/src/PlotlyJS.jl @@ -136,21 +136,6 @@ function __init__() JSON3.write(p::SyncPlot) = JSON.json(p.plot) end - @require IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" begin - - function IJulia.display_dict(p::SyncPlot) - Dict( - "application/vnd.plotly.v1+json" => JSON.lower(p), - "text/plain" => sprint(show, "text/plain", p), - "text/html" => let - buf = IOBuffer() - show(buf, MIME("text/html"), p) - String(resize!(buf.data, buf.size)) - end - ) - end - end - @require CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" begin function dataset(::Type{CSV.File}, name::String) ds_path = check_dataset_exists(name) From 07fb288c495955c586b7c31f62edd2f828563741 Mon Sep 17 00:00:00 2001 From: Allen Hill Date: Fri, 28 Oct 2022 20:40:18 -0400 Subject: [PATCH 2/2] Remove show method def for the plotly mime The plotly mime appears to have a higher precedence (due to IJulia or the presence of the plotly jupyter extension) which prevents the WebIO scope from being rendered. --- src/display.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display.jl b/src/display.jl index ba1c50ad..3ee01aca 100644 --- a/src/display.jl +++ b/src/display.jl @@ -344,7 +344,7 @@ for f in (:extendtraces!, :prependtraces!) end -for mime in ["text/plain", "application/vnd.plotly.v1+json", "application/prs.juno.plotpane+html"] +for mime in ["text/plain", "application/prs.juno.plotpane+html"] function Base.show(io::IO, m::MIME{Symbol(mime)}, p::SyncPlot, args...) show(io, m, p.plot, args...) end