Pivot table cells width
How to assign aggregate column width?
3 answers
Hello,
Thank you for reaching out to us.
The width of the specified column, as well as the height of rows, can be adjusted using the tableSizes
property of the report
object.
It has the following structure:
tableSizes
– Object. Contains information about table sizes:
columns
– Array of objects. Each object is used to save and restore the width of some column in the report:width
– Number. Column width in pixels.idx
– Number. Column’s index, starts from 0.tuple
– Array. Consists of unique names that identifies the column in the table based on data in it.measure
(optional) – Object. Identifies the measure (this property is defined only if “[Measures]” is selected for columns in the slice).measure
is used withtuple
and is not set whenidx
is used. Has the following properties:uniqueName
– String. The measure’s unique name.aggregation
(optional) – String. The measure’s aggregation type. Please note, it’s necessary to use eitheridx
ortuple
, not both.
rows
– Array of objects. Each object is used to save and restore the height of some row in the report:height
– Number. Row height in pixels.idx
– Number. Row’s index, starts from 0.tuple
– Array. Consists of unique names that identify the row in the table based on data in it.measure
(optional) – Object. Identifies the measure (this property is defined only if “[Measures]” is selected for rows in the slice).measure
is used withtuple
and is not set whenidx
is used. Has the following properties:uniqueName
– String. The measure’s unique name.aggregation
(optional) – String. The measure’s aggregation type. Please note, it’s necessary to use eitheridx
ortuple
, not both.
Please find out an example we have prepared for you.
Do not hesitate to contact us in case additional questions occur.
Kind regards,
WebDataRocks Team
Can we set auto width for columns?
Hello,
Thank you for writing to us.
We would like to kindly explain that the width of each column is adjusted automatically to wrap the longest value contained by its cells.
In case another behavior is required, our team suggests providing us with additional details or a demonstration of the desired result.
We are looking forward to hearing from you.
Kind regards,
WebDataRocks Team