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.
This did not work for me: If the websocket connects before the onopen event is set, all the stuff in conn.onopen will never be called.