cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Here is the script on how to color the Pivot cell based on the value of this cell.
For example color the cells that contains the value "True":
//Text column formatting
widget.on('ready', function(se, ev){

var evalCol = 12; //fidx val of column to evaluate
var formatCol = $('td.p-dim-member[fidx='+evalCol+']'); //jquery pull entire eval column into array

$.each(formatCol, function(a, b){ //function to loop through array

if(this.textContent == 'True'){ //evaluate text conent of each cell in column's array. note: need to use JavaScript this instead of JQuery $(this), since textContent is a JavaScript attribute.
$(this).css('background-color','#32CD32); //set conditional styling
}
});
});
Comments
gray_davidson
8 - Cloud Apps
8 - Cloud Apps

Hi, this looks like it does exactly what I need, but I'm not familiar enough with scripting in Fusion to make use of what you've written.  Currently I'm looking at a value column in a widget and examining my conditional formatting options but of course the default options are only applicable to numerical columns. 

I'd like to implement your script which I am guessing means copying it to a file and saving it somewhere?  But I'm not familiar with that process.  I have successfully installed a plugin once before but at that time I had a folder available which contained a plugin.json file and a .js file.  Is that how this works?  

Thanks in advance.  

Version history
Last update:
‎03-02-2023 09:22 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: