cancel
Showing results for 
Search instead for 
Did you mean: 
ILLIA
Sisense Team Member
Sisense Team Member

Hide vertical lines on the Pivot widget 

To test this solution, you must create a dashboard based on any cube and create any Pivot widget. Once it is done - please go to the widget editor, click three dots select Edit Script, then paste the following script there:

 

const howManyRowsToIgnore = 2;


widget.on('ready', () => {
    const cells = element[0].querySelectorAll('.table-grid__cell');


    let maxColIndex = 0;
    cells.forEach(cell => {
        const match = cell.className.match(/table-grid__cell--col-(\d+)/);
        if (match) {
            const colIndex = parseInt(match[1], 10);
            if (colIndex > maxColIndex) {
                maxColIndex = colIndex;
            }
        }
    });

    cells.forEach(cell => {
        const colMatch = cell.className.match(/table-grid__cell--col-(\d+)/);
        const rowMatch = cell.className.match(/table-grid__cell--row-(\d+)/);
        
        if (colMatch && rowMatch) {
            const colIndex = parseInt(colMatch[1], 10);
            const rowIndex = parseInt(rowMatch[1], 10);

            if (rowIndex >= howManyRowsToIgnore) {
                if (colIndex !== 0) {
                    cell.style.borderLeft = 'none';
                }
                if (colIndex !== maxColIndex) {
                    cell.style.borderRight = 'none';
                }
            }
        }
    });
});

 

Please note there is a howManyRowsToIgnore parameter that specifies how many first rows to ignore. It is done to have the possibility to leave vertical lines for header values if needed. If you need to hide all vertical lines including header-related lines as well - just set this value to 0.

As a result, we have a Pivot widget with hidden vertical lines:

ILLIA_0-1738603735617.png

[ALT Text: A table titled "Budget" displaying a list of brands along with their corresponding total costs. The first entry, "ABC," shows a total cost of $3,564,045.86. The subsequent entries include brands such as "Addimax," "Adderax," and "Addulator Inc," along with their respective total costs, ranging from around $100 to several million. The table spans multiple rows and includes a total of 2094 entries. The header indicates columns for "Brand" and "Total Cost."]

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.

Rate this article:
Version history
Last update:
‎02-03-2025 09:54 AM
Updated by:
Contributors