vega-lite-api
vega-lite-api copied to clipboard
Add method to quickly open chart in the editor from Observable
I would like to debug a chart and have a hard time loading the chart in the editor. Right now, I am adding JSON.stringify(chart.toJSON() and then copy-paste. It would be nice to use Vega-Embed in https://observablehq.com/@vega/vega-lite-api so that I can quickly add the action button with a button to open the chart in the editor.
Agreed, this would be useful.
For anyone else seeing this, for the moment you can do this:
embed(vl_api_chart.toSpec())
where
embed = require("vega-embed@6")
(toJSON is deprecated I believe)