From c4752b786b7074b5a39dac40772c75ed4b7cf8c2 Mon Sep 17 00:00:00 2001 From: Jks Liu Date: Thu, 2 Dec 2021 23:33:52 +0800 Subject: [PATCH] Fix #3967 (#3978) Pluto do not use require.js, so Plotly is not renamed to Plotly2 --- src/backends/plotly.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 05e87f11..eb5f2692 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -1079,10 +1079,10 @@ function plotly_html_body(plt, style = nothing) requirejs_prefix = """ requirejs.config({ paths: { - Plotly2: '$(plotly_no_ext)' + Plotly: '$(plotly_no_ext)' } }); - require(['Plotly2'], function (Plotly2) { + require(['Plotly'], function (Plotly) { """ requirejs_suffix = "});" end @@ -1101,7 +1101,7 @@ end function js_body(plt::Plot, uuid) js = """ - Plotly2.newPlot('$(uuid)', $(plotly_series_json(plt)), $(plotly_layout_json(plt))); + Plotly.newPlot('$(uuid)', $(plotly_series_json(plt)), $(plotly_layout_json(plt))); """ end