also add plotly json mime to PlotlyBackend
This commit is contained in:
parent
581f3797bc
commit
56525ced92
@ -853,11 +853,16 @@ end
|
|||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
|
function _show(io::IO, ::MIME"application/vnd.plotly.v1+json", plot::Plot{PlotlyBackend})
|
||||||
function _show(io::IO, ::MIME"text/html", plt::Plot{PlotlyBackend})
|
data = []
|
||||||
write(io, html_head(plt) * html_body(plt))
|
for series in plot.series_list
|
||||||
|
append!(data, plotly_series(plot, series))
|
||||||
|
end
|
||||||
|
layout = plotly_layout(plot)
|
||||||
|
JSON.print(io, Dict(:data => data, :layout => layout))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function _display(plt::Plot{PlotlyBackend})
|
function _display(plt::Plot{PlotlyBackend})
|
||||||
standalone_html_window(plt)
|
standalone_html_window(plt)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user