A layout positions a collection of group marks within a grid, simplifying the composition of small multiples and coordinated multiple view displays. When applied at the top-level of a specification or within a group mark, all immediate children group marks will be collected and positioned according to the layout specification. The layout engine supports flow layout as well as column, row, and grid-aligned layouts.
The layout engine also supports inclusion of header and footer cells for both rows and columns, as well as row title and column title cells. To indicate headers, footers and titles, the specifications for these groups must include a
role property set to one of
row-title. The number of header, footer, or title elements should match the number of rows or columns in the table. If there are fewer elements, some cells will be left empty. If there are too many elements, the additional elements will be ignored and a warning will be logged.
The order of groups within the layout depends on both specification order (across group mark definitions) and internal mark ordering (for multiple group instances within a single group mark definition). The order that group mark definitions appear in the specification determines their order in the layout. Within a single group mark specification with multiple group instances, the internal ordering of the group items determines both their rendering order and their order in the layout. The internal order can be modified using the
Properties for specifying a grid layout of contained group marks.
|align||String | Object||The alignment to apply to grid rows and columns. The supported string values are
|bounds||String||The bounds calculation method to use for determining the extent of a sub-plot. One of
|columns||Number||The number of columns to include in the layout. If unspecified, an infinite number of columns (a single row) will be assumed.|
|padding||Number | Object||The padding in pixels to add between elements within a row or column. An object value of the form
|offset||Number | Object||The orthogonal offset in pixels by which to displace grid header, footer, and title cells from their position along the edge of the grid (default
|headerBand||Number | Object||A band positioning parameter in the interval [0,1] indicating where in a cell a header should be placed. For a column header,
|footerBand||Number | Object||A band positioning parameter in the interval [0,1] indicating where in a cell a footer should be placed. For a column footer,
|titleBand||Number | Object||A band positioning parameter in the interval [0,1] indicating where in a cell a title should be placed. For a column title,