

Warning: If the cardinality of a discrete x- or y-field is too high, the plot might become too packed. The view width and height property can be set to numbers indicating fixed width and height of the plot.įor a discrete axis, specifying a fixed size (e.g., width in the following plot) would automatically scale the discrete step to fit the size.

Similarly, the height will be based on for a plot with a continuous y-field and for a plot with either a discrete y-field or no y-field.įor example, the following bar chart has a fixed 200px height and a 20px width per x-field’s discrete step. For a plot with either a discrete x-field or no x-field, the width is based on, which is set to have step width based on the default step size ( – 20 by default). The width will be based on for a plot with a continuous x-field ( 200 by default). If the top-level width / height property is not specified, the width / height of a single view is determined based on the view config. To set the overall size of the visualization, the autosize property can be specified. By default, width and height set the size of the data rectangle (plotting) dimensions. Single view and layer specifications can contain the width and height properties for customizing the view size. Width and Height of Single and Layered Plots

Width and Height of Multi-View Displays.Specifying Width and Height per Discrete Step.Width and Height of Single and Layered Plots.This page describe how to adjust width and height of visualizations in Vega-Lite.
