Closed domoritz closed 7 years ago
@arvind What is the best way to load a vega spec into lyra?
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.
You can find an example of postMessaging to Lyra with our Sitar prototype.
Implemented
People were complaining that this is broken sometimes.
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.
From https://github.com/uwdata/vegalite/issues/46