We have updated WebDataRocks EULA, effective as of April 18, 2024. Learn more about what's changed.

Rows in column


How to give two rows in one column in pivot table?


1 answer

WebDataRocks Team WebDataRocks June 3, 2020

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")

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.
WebDataRocks Team