Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting height to "container" (i.e. responsive sizing) does not work as expected #544

Open
zgottlieb opened this issue Sep 20, 2022 · 1 comment

Comments

@zgottlieb
Copy link

I am trying to create a responsive chart with Vega Lite and react-vega. When I use the "container" setting for height and width in the spec, I am seeing that the width seems to work properly, taking up the width of the container and resizing as you resize the container. However, the height appears to be collapsed on initial load, and when resizing the window / container, the height seems to grow indefinitely, even when shrinking the window (which you'd expect to shrink the height of the chart).

The versions I am using are:

  • react-vega 7.6.0
  • vega 5.22.0
  • vega-lite 5.2.0

Here is a CodeSandbox that shows the issue I am having: https://codesandbox.io/s/react-vega-typescript-forked-9f42rv. I've also attached a gif here to make it more clear what issues I am seeing.

vega-lite-resize-issue

@sim-uw
Copy link

sim-uw commented May 16, 2024

I've experienced a similar issue when VegaLite is a flex item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants