SandDance
SandDance copied to clipboard
Pass Vega specification to Vega Editor for preview and edits
This is a feature request to improve online version of SandDance integration with online Vega Editor.
Synopsis:
Currently, SandDance online version has an option to Open Vega Editor for a chart in Chart Settings -> Tools section, Show Vega spec dialog. However, that dialog only links to online Vega Editor and doesn't pass the generated chart Vega spec for edits and preview in that tool.
Feature request:
Create compact Vega spec json string and Url encode generated Vega json for your chart using json-stringify-pretty-compact
and lz-string
libraries to pass it as a parameter to Vega Editor.
You can glean some info on how Vega Editor encodes vega specs in this vega-unfurl dev to post: https://dev.to/tarasnovak/vega-unfurl-take-2-5fnb
The general patern is: https://vega.github.io/editor/#/url/vega/<lz-vega-json-compact-compressed-string>
@danmarshall Let me know if you have questions about this integration proposal.
Instead of passing via URL, please use the post message API like Vega Embed does.
or that. in any case, would be much better than just opening vega editor with latest spec loaded in browser that has nothing to do with vega spec viewed in SandDance.
@domoritz thanks for your post tip on this!
@danmarshall any updates on this?
@RandomFractals not from me, but this is a good idea and I'd be happy to take a PR :)