queryverse / ElectronDisplay.jl

An Electron.jl based figure and table display.
Other
85 stars 17 forks source link

Add plotly skeleton support #1

Closed davidanthoff closed 6 years ago

davidanthoff commented 6 years ago

@sglyon This is a first stab at adding support for the plotly MIME type (application/vnd.plotly.v1+json). I've got the whole design working end-to-end for vega-lite already, so we just need to tweak things a little bit for Plotly, I think.

I think the right approach would be to add a show method for this MIME type to https://github.com/sglyon/PlotlyBase.jl, right? And then fix up the HTML code here a little.

Oh, and then we should probably also add that MIME type to IJulia in the same way that I added the vega-lite MIME type there, and at that point it should all automatically work in jupyterlab and nteract.

davidanthoff commented 6 years ago

Oh, and one more thing: once we have things up and running here, I'll add the same support to the VS Code extension plot pane.

sglyon commented 6 years ago

This is great!

Thanks for working on it.

Your ideas sound spot on. We do need to add the show method to PlotlyBase and also make IJulia aware of the mimetype.

We can have a discussion over in IJulia, but I think it would be a great idea to have a register_mimetype function in IJulia that allows users to register mime types (like Vega/vegalite/plotly) without having to adjust the source code of IJulia itself. Maybe this is the right time to work out potential design issues over in IJulia?