Altair chart inside a (panel) Flexbox with "container" width #3327
Unanswered
bertcoerver
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm trying to put some Altair charts inside a flexbox, having the width of the charts adjust to the available space. I'm using Panel to set up the flexbox, like this:
Which gives me flex-items that always fill up the available space on the row and never get smaller than 200px. For example (the white boxes are the Altair charts):
When the viewport is small, every item is on a single row:
As the viewport gets larger multiple items are places on a row:
And even wider:
Now I want the charts to adapt their size to its parent (i.e. the green box). But as soon as I turn on
width = "container"
on the chart, the flexbox behaviour breaks: the flex-items still fill up the width of the viewport, but they never get grouped together on a row anymore (there is always only 1 item per row).Any ideas on how to fix this?
Regards,
Bert
Beta Was this translation helpful? Give feedback.
All reactions