vega-lite-api icon indicating copy to clipboard operation
vega-lite-api copied to clipboard

Add method to quickly open chart in the editor from Observable

Open domoritz opened this issue 5 years ago • 1 comments

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.

domoritz avatar Jan 14 '20 17:01 domoritz

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)

RobinL avatar Aug 31 '21 14:08 RobinL