Minor cleanup plotlyjs (#3510)

This commit is contained in:
Fons van der Plas 2021-05-19 08:28:03 +02:00 committed by GitHub
parent de7717b85f
commit c0e50588d3
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