Pluto do not use require.js, so Plotly is not renamed to Plotly2
This commit is contained in:
Jks Liu 2021-12-02 23:33:52 +08:00 committed by Zhanibek
parent ec1d2d201e
commit 836435d01c

View File

@ -1079,10 +1079,10 @@ function plotly_html_body(plt, style = nothing)
requirejs_prefix = """ requirejs_prefix = """
requirejs.config({ requirejs.config({
paths: { paths: {
Plotly2: '$(plotly_no_ext)' Plotly: '$(plotly_no_ext)'
} }
}); });
require(['Plotly2'], function (Plotly2) { require(['Plotly'], function (Plotly) {
""" """
requirejs_suffix = "});" requirejs_suffix = "});"
end end
@ -1101,7 +1101,7 @@ end
function js_body(plt::Plot, uuid) function js_body(plt::Plot, uuid)
js = """ js = """
Plotly2.newPlot('$(uuid)', $(plotly_series_json(plt)), $(plotly_layout_json(plt))); Plotly.newPlot('$(uuid)', $(plotly_series_json(plt)), $(plotly_layout_json(plt)));
""" """
end end