Sijo1995
10-28-2022Cloud Apps
Formatting Pivot Header Rows And Columns Via CSS
Hi Team,
Use this script to format the header rows and columns of a Pivot table.
widget.on('domready', function(sender, ev){
$('div.p-container table').css({'width':'90%','table-layout':'fixed'});
// $('.p-container .p-fixed-cols, .p-container .p-fixed-corner, .p-container .p-fixed-rows').css({'width':'99%'});
$('div.p-fixed-cols').css({'width':'0px'});
$('div.p-fixed-corner').css({'width':'0px'});
$('div.p-fixed-rows').css({'width':'0px','position':'fixed'});
$('div.p-head-content').css({'padding-top':'9px'});
//Set bottom border for all cells
// $tcells = $("[fidx]", element);
// $tcells.css('border-bottom', 'thin solid #5b9bbc');
// $tcells.css('border-right', 'thin solid #C0C0C0');
//header columns
var $ps1 = $(".p-grand-total-head,.p-dim-head,.p-dim-member-head", element);
// $ps1.css('font-size' , '12px');
$ps1.css('font-weight' , 'bold');
$ps1.css('color' , '#132f57');
$ps1.css('background-color' , '#e2e9ec');
$ps1.css('text-align' , 'center');
$ps1.css('vertical-align' , 'middle'); //phantom
//$ps1.css('padding-top' , '9px');
});
Thanks
Sijo