How to change pivot cells font-size and style [Linux]
Introduction
This article explains how to change the font size and style of cells in a Sisense Pivot Table widget using the official Pivot 2.0 API (widget.transformPivot).
A common approach found in community posts relies on jQuery class selectors such as .p-head-content and .p-value to apply CSS changes directly to the DOM. While this may work in older versions, it is not officially supported and is prone to breaking across Sisense updates, since class names and UI structure can change between releases.
The recommended and supported approach is to use the widget.transformPivot API, which provides a stable, version-resilient way to style pivot cells programmatically.
The solution is tested on Sisense L2026.1.2 and works for both cloud and on-premises deployments.
Step-by-Step Guide
1. Open the widget script editor
Click the three-dot menu on your Pivot Table widget → Edit Script.
2. Identify the cell types you want to style
The transformPivot API allows you to target specific cell types within the pivot:

You can target one, several, or all types in a single call.
3. Paste the script
widget.transformPivot(
{ type: ['value', 'member', 'subtotal', 'grandtotal'] },
function(metadata, cell) {
cell.style = cell.style || {};
cell.style.fontSize = '8px';
}
);4. Customize the style
At the core of the script, the cell.style object accepts standard CSS properties in camelCase format. You can extend it to apply additional styles beyond font size. For example:
widget.transformPivot(
{ type: ['value', 'member', 'subtotal', 'grandtotal'] },
function(metadata, cell) {
cell.style = cell.style || {};
cell.style.fontSize = '8px';
cell.style.fontWeight = 'bold';
cell.style.color = '#333333';
cell.style.fontFamily = 'Arial, sans-serif';
}
);5. Click Apply and test
Save the script and reload the widget. All targeted cell types will now reflect the styles you defined.
Important notes
Why not use jQuery class selectors? Scripts that rely on class names like .p-head-content or .p-value are tied to the internal DOM structure of the widget, which Sisense does not guarantee to remain stable across versions. These scripts may stop working after an upgrade without any warning.
Pivot 2.0 API only: The widget.transformPivot method is part of the Pivot 2.0 API. Ensure your widget is using Pivot 2.0 (not the legacy Pivot widget) for this script to work.
Cell types: If you only want to style specific cell types (e.g. only data values), simply remove the unwanted types from the array. For example, { type: ['value'] } will only affect data cells.
Conclusion
By using the widget.transformPivot API instead of direct DOM manipulation, you get a supported, upgrade-safe way to control the visual appearance of pivot cells. The cell.style object accepts any standard CSS property in camelCase, making it straightforward to extend this pattern to font family, weight, colour, and more.
References / Related content
Disclaimer:This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.