Open tmcw opened 6 years ago
Here are a few demos of how to use streaming data and the reactive features of Vega: https://beta.observablehq.com/@domoritz/reactive-vega-lite and https://beta.observablehq.com/@domoritz/vega-lite-demo-with-streaming-data. All I needed here was access to the Vega view object.
I'd like to fix this issue. I'm working on an observable module that uses Vega-Embed to render the chart. It will look similar to https://beta.observablehq.com/@domoritz/vega-lite-demo-with-vega-embed. Now I wonder how I can return both the dom object and the view from a module. Any suggestions?
Here is what I'm currently experimenting with https://beta.observablehq.com/d/d20180516e86a3b3
Mind publishing that? /d/...
URLs are private
https://beta.observablehq.com/@domoritz/vega-embed-observable-package-experiments and it's using the packages from https://github.com/vega/vega-observable.
All examples are broken on @observablehq, for example https://beta.observablehq.com/@domoritz/reactive-vega-lite results in
Error: unable to load package.json
> embed = require('vega-embed@3')
@Fil Thanks for the bug report. I fixed it and it should work again once the CDN updates.
To do advanced techniques with Vega Lite - like streaming data into it - you need the chart object, which afaik is not exposed through this interface.