Minor cleanup plotlyjs (#3510)
This commit is contained in:
parent
de7717b85f
commit
c0e50588d3
@ -953,8 +953,7 @@ function plotly_html_body(plt, style = nothing)
|
|||||||
<div id=\"$(uuid)\" style=\"$(style)\"></div>
|
<div id=\"$(uuid)\" style=\"$(style)\"></div>
|
||||||
<script>
|
<script>
|
||||||
$(requirejs_prefix)
|
$(requirejs_prefix)
|
||||||
PLOT = document.getElementById('$(uuid)');
|
$(js_body(plt, uuid))
|
||||||
Plotly.plot(PLOT, $(plotly_series_json(plt)), $(plotly_layout_json(plt)));
|
|
||||||
$(requirejs_suffix)
|
$(requirejs_suffix)
|
||||||
</script>
|
</script>
|
||||||
"""
|
"""
|
||||||
@ -963,7 +962,7 @@ end
|
|||||||
|
|
||||||
function js_body(plt::Plot, uuid)
|
function js_body(plt::Plot, uuid)
|
||||||
js = """
|
js = """
|
||||||
PLOT = document.getElementById('$(uuid)');
|
var PLOT = document.getElementById('$(uuid)');
|
||||||
Plotly.plot(PLOT, $(plotly_series_json(plt)), $(plotly_layout_json(plt)));
|
Plotly.plot(PLOT, $(plotly_series_json(plt)), $(plotly_layout_json(plt)));
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user