View live: https://observablehq.observablehq.cloud/framework-example-vega-responsive/
This Observable Framework example demonstrates how to implement responsive width in Vega-Lite using Framework’s resize
built-in, which is implemented with ResizeObserver. The chart automatically resizes to fit the container. A reusable helper function vlresize
is provided in src/vlresize.js
.