Rows in column
How to give two rows in one column in pivot table?
1 answer
Hello,
Thank you for contacting us.
In case your requirement is to wrap the content of the cell, the following approach can be used.
Use the customizeCell
hook and mark desired cells with a unique CSS class:
pivot.customizeCell((cell, data) => {
if(data.type == "header" && data.hierarchy && data.hierarchy.uniqueName == "Hierarchy Unique Name")
cell.addClass("wrapped");
});
Next, the following styles should be applied to the mentioned CSS class:
.wrapped {
white-space: normal !important;
max-width: 140px;
text-align: center !important;
}
Please see an example we have prepared for you.
Our team hopes it works for your case.
Please contact us in case additional questions appear.
Regards,
WebDataRocks Team