vega / polestar

Lightweight Tableau-style interface for visual analysis, built on Vega-lite.
http://vega.github.io/polestar
Other
368 stars 47 forks source link

Export to lyra #7

Closed domoritz closed 7 years ago

domoritz commented 9 years ago

From https://github.com/uwdata/vegalite/issues/46

domoritz commented 9 years ago

@arvind What is the best way to load a vega spec into lyra?

arvind commented 9 years ago

Hi Dom, we added an HTML5 message API to Lyra to accept a Vega specification from an external application. Some high-level details about it can be found here.

Basically, you would open a Lyra window (window.open) and use postMessage to send it a message of the form {spec: ...}. On receiving the message, Lyra will try to parse the spec and re-create it in the interface. Note: Lyra doesn't support everything Vega does, and certainly not the additions y'all have made in v1.4, so expect it to be a lossy import. Feel free to create issues for things that don't import losslessly (that's a fun word) and I can see if I can assign it to an undergrad to work on.

Let me know if you run into any issues, and I'm happy to help.

arvind commented 9 years ago

You can find an example of postMessaging to Lyra with our Sitar prototype.

domoritz commented 9 years ago

Implemented

kanitw commented 9 years ago

People were complaining that this is broken sometimes.

domoritz commented 9 years ago

Yes, It is is very unstable because we may not send what lyra expects and the vega versions may not match. We need to work on compatibility between our tools! That's probably a good topic for another meeting. @jheer

On Wed, Apr 22, 2015 at 10:19 PM, Kanit Wongsuphasawat < notifications@github.com> wrote:

People were complaining that this is broken sometimes.

— Reply to this email directly or view it on GitHub https://github.com/uwdata/polestar/issues/7#issuecomment-95439224.