Table Sizes Object

A tableSizes object stores size settings for columns and rows.

You can also modify the size of the cells through the UI.

Properties

NameTypeDescription
columnsArray of Column Sizes Objectsoptional Contains width configurations for particular columns.
rowsArray of Row Sizes Objectsoptional Contains height configurations for particular rows.

Table Sizes subobjects:

A Column Sizes object contains width configurations for particular columns in the report:

NameTypeDescription
widthNumberThe width of the column, specified in pixels.
idxNumberAn index representing the position of the column in the table, starts from 0.
tupleArray of stringsIncludes unique names of members that identify the column.
measureStringoptional The unique name of the measure connected with the column. Must be used with the tuple property.
Define this property only if “Measures” is located in columns in the slice.

Note. When setting column sizes, specify the target column using either idx or a tuple, but not both simultaneously.

A Row Sizes object contains height configurations for particular rows in the report:

NameTypeDescription
heightNumberThe height of the row, specified in pixels.
idxNumberAn index representing the position of the row in the table, starts from 0.
tupleArray of stringsIncludes unique names of members that identify the row.
measureStringoptional The unique name of the measure connected with the row. Must be used with the tuple property.
Define this property only if “Measures” is located in rows in the slice.

Note. When setting row sizes, specify the target row using either idx or a tuple, but not both simultaneously.

Example

tableSizes: {
columns: [
{
tuple: [
"Country.France"
],
measure: "Price",
width: 150
},
{
tuple: [],
measure: "Price",
width: 200
}
],
rows: [
{
idx: 4,
height: 80
}
],
}

Try it on CodePen.