JuliaGizmos / Escher.jl

Composable Web UIs in Julia
https://juliagizmos.github.io/Escher.jl
Other
335 stars 63 forks source link

Embedding PlotJS.jl Plot #166

Open asbisen opened 7 years ago

asbisen commented 7 years ago

Thanks a lot Shashi for the great work on Escher. I am trying to embed plots from PlotlyJS.jl inside Escher without any success. Is there a way to embed self contained html inside a tile?

shashi commented 7 years ago

Can you post a simple piece of code you're trying?

McNees287 commented 7 years ago

I would also like to be able to use PlotlyJS.jl inside of Escher.

Here's some sample code for producing a histogram from the PlotyJS.jl docs:

using PlotlyJS

function two_hists()
    x0 = randn(500)
    x1 = x0+1

    trace1 = histogram(x=x0, opacity=0.75)
    trace2 = histogram(x=x1, opacity=0.75)
    data = [trace1, trace2]
    layout = Layout(barmode="overlay")
    plot(data, layout)
end
two_hists()