Minor cleanup plotlyjs

This commit is contained in:
Fons van der Plas 2021-05-18 20:59:35 +02:00 committed by GitHub
parent a1311e5c60
commit 10e2401d50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -953,8 +953,7 @@ function plotly_html_body(plt, style = nothing)
<div id=\"$(uuid)\" style=\"$(style)\"></div>
<script>
$(requirejs_prefix)
PLOT = document.getElementById('$(uuid)');
Plotly.plot(PLOT, $(plotly_series_json(plt)), $(plotly_layout_json(plt)));
$(js_body(plt, uuid))
$(requirejs_suffix)
</script>
"""
@ -963,7 +962,7 @@ end
function js_body(plt::Plot, uuid)
js = """
PLOT = document.getElementById('$(uuid)');
var PLOT = document.getElementById('$(uuid)');
Plotly.plot(PLOT, $(plotly_series_json(plt)), $(plotly_layout_json(plt)));
"""
end