vega-lite
vega-lite copied to clipboard
Fit chart size to content for repeated charts to remove empty space
When I create a repeated chart, the width and height is kept constant for all charts instead of dynamically adapted to the content of the chart. This can create a lot of whitespace between charts, which doesn't look very good. Here is a small example where I think it would make more sense if B was made into a narrower chart.
Open the Chart in the Vega Editor
I think it would be a sensible default to have the dimensions fit the chart content, and also more expected since this is consistent with how Vega-Lite behaves for single figures. If there is an intended use case for the current behavior that I am missing, I think it could also make sense to introduce a resolve option (or repeat parameter) for width/height similar to how it works for facets:
Shared x-scale:
Open the Chart in the Vega Editor
Independent x-scale:
Open the Chart in the Vega Editor