Forum Discussion
cartercjb
02-21-2022ETL
Thanks, Hari. harikm007
Here is the script I used based on your recommendation:
/*
Welcome to your Widget's Script.
To learn how you can access the Widget and Dashboard objects, see the online documentation at https://developer.sisense.com/pages/viewpage.action?pageId=557127
*/
widget.on('ready', function(se, ev) {
panelName = 'UNITS' //Update your panel name from which color needs to spread to entire row
var colIndex = -1
$('pivot2 .pivot-scroller table tbody tr').each(function(index, trElement){
if(index == 0)
{
$(trElement).find('td .table-grid__content .table-grid__content__inner').each(function(tdIndex, tdElement){
if ($(tdElement).text() == panelName){
colIndex = tdIndex
}
})
}
else{
if(colIndex >= 0){
bgColor = $(trElement).find('.table-grid__cell--col-' + colIndex).css('backgroundColor')
$(trElement).find('td').each(function(tdIndex, tdElement){
$(tdElement).css('backgroundColor', bgColor)
})
$('pivot2 .table-grid--rows table tbody tr').each(function(rowIndex, rowElement){
if(rowIndex > 0 && index == rowIndex){
$(rowElement).find('td').css('backgroundColor', bgColor)
}
})
}
}
})
})
Here is the output:
Am I missing something?
harikm007
02-21-2022Data Warehouse
Please check if you are using pivot2.
This is how I normally check whether it is Pivot or Pivot2:
-Hari