Greater-London-Authority / ldn-viz-tools

https://greater-london-authority.github.io/ldn-viz-tools/
1 stars 0 forks source link

make width of obsservable plots optionally responsive #190

Closed jamesscottbrown closed 7 months ago

jamesscottbrown commented 7 months ago

What does this change?

Provides a prop that allows the observable plot component's width to be repsonsive.

It debounces increases in width, but we can't debounce decreases, as observable plot will detect if the plot is wider than its parent and resize itself.

jamesscottbrown commented 7 months ago

See preview: https://dev.ldn-gis.co.uk/storybook-observable-plot-responsive/?path=/story/charts-observableplot--with-responsive-width