Skip to main content

Pivot Table Lines Extend Beyond Table



  • Malinda Jepsen

    You can use this JavaScript in the widget to hide them:

    widget.on("domready", function(w){
    var tags = $('td.phantom', element);
    for(var i=0; i<tags.length; i++) {
    tags[i].style.width = '0px';

  • Elliott Herz

    Hey Jessica,


    You can also use this script, which will dynamically expand the width of the fields to take up the entire space of the pivot:


    // Export to PDF will not execute the pivot will render as if there was no script
    widget.on("domready", function(w, args){
    var tag = $('tr#pivot__ACCRowArea', element)[0];
    var numGroups = $('td.p-dim-head', tag).length;
    var tagWidth = tag.offsetWidth;
    var numCols = tag.children.length;
    var pivotWidth = $("div.p-fixed-rows", element)[0].offsetWidth;
    var groupWidth = 0;

    if(pivotWidth > tagWidth) {
    for(var i=0; i<numCols; i++) {
    if(i < numGroups) {
    groupWidth += (Math.trunc(tag.children[i].offsetWidth * pivotWidth / tagWidth));
    $('[fidx=' + i + ']', element).width(Math.trunc(tag.children[i].offsetWidth * pivotWidth / tagWidth));
    $(".p-fixed-cols", element).width(groupWidth);
    $(".p-fixed-corner", element).width(groupWidth);
    $("td.phantom", element).width(0);
    else {
    console.log("script couldn't execute as their wasn't enough space to expand the pivot");

  • Jessica Orlando

    Hi Malinda,


    This is exactly what I needed! Thank you!


    I still wish this would not happen as it seems to be a flaw in the design of the dashboard, but we will use the script in the meantime.



  • Chris Bridges

    Malinda Jepsen Thank you for the code! That worked perfect for me too! I'm curious, and I have no experience with it, but could this code be put into it's own plugin so that it is applied to all pivots on all dashboards?


    Best Regards,


  • Malinda Jepsen

    Chris Bridges I'm not great with developing plugins, so I'm not sure. Someone who develops plugins might be able to help?

  • Daniel Rosbottom


    I'm having an issue with your code and creating a white line through my first row of data. Do you know of any work arounds to that?


Please sign in to leave a comment.