Facet Charts with dynamic spacing #3884
Unanswered
chrisHassan
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi There,
I’d like to control the height of each row (facet group) in a faceted Altair chart, rather than having a uniform facet height.
In the example below, I have three groups with different numbers of rows. Each group currently renders as a facet with the same height, but I’d like each row’s height to scale based on the number of items (i.e. width per record plotted rather than per facet group).
Here’s a minimal example:
This produces a chart where each facet block has the same height, even though the number of rows (images) varies by group:
To approximate variable facet heights, I tried generating each group separately and concatenating them with a height proportional to the number of rows. This almost works - but feels a bit clunky and manual:
Is there a way:
Appreciate time and help with this :-)
Beta Was this translation helpful? Give feedback.
All reactions