Reputation: 1645
I made changes to a vega-lite chart via view.change
(here), then I want to export the vega-spec. I checked how the buttons in vega-embed does it (code) but realized that it just references the original spec. I need the vega spec after. Any one has any ideas how? The view
APIs don't see to give a, "get spec" functionality.
Thanks!
Upvotes: 1
Views: 257
Reputation: 5935
View updates do not change the spec but only the state of the dataflow. Use view.getState
to get the state. More at https://vega.github.io/vega/docs/api/view/#view_getState.
Upvotes: 1