Column groups
Structure
{mainTitle} | ||||
{subTitle} | ||||
group importance primary | group importance primary | group importance secondary | group importance secondary | |
importance secondary | importance primary | importance secondary | importance primary | |
importance primary |
|
|
|
|
importance primary |
|
|
|
|
Behavior
Column groups are produced by copying the template cells including their formatting and adding them to the produced table.
If there are multiple columns in a column group, the column group is merged across all column cells.
To specify the formatting of a column group, it should be placed in its own row directly above the columns. For each column there has to be a column group above it, even if it specifies the same importance. This is so that during production the algorithm can look up the correct column group based on the column. In the case where multiple column groups with the same importance are defined, the last one is used.
The syntax for specifying a column group cell is: group importance <importance>
. Where importance can be either primary
, secondary
or a positive number.
Column groups are only shown when certain criteria is met. The table style has to have column groups defined. If that is true it depends on the value of VerticalTableNode.headerGroupsHideIfNoLabels
. If it isn’t specified or set to true
and no column groups are defined in the data, then the column groups row is not produced.
Why is the row header name missing in the example structure?
The row header name, that is, the column for the row headers, is on the column level and described in the rows chapter.
Examples
Example 1: A simple case where column groups exist in the data and the style is set
Example 2: The data has no column groups but headerGroupsHideIfNoLabels is set to false
Example 3: The style defines importances as positive numbers