A demo of Vega-Lite with websockets. Uses Vega-Embed to access the Vega View API.
In this demo, we don't use an external data source and instead send and receive data from an echo server. Of course you would never do this in practice but this way we can have both the sender and the receiver in the same piece of code to illustrate the appraoch.
The demo sends a row every second until all data has been transmitted. To restart the demo, refresh the page.
https://cdn.jsdelivr.net/npm/vega@3
https://cdn.jsdelivr.net/npm/vega-lite@2
https://cdn.jsdelivr.net/npm/vega-embed@3