cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

Conditional formatting in a data table

Hi. Does anyone know how to do conditional formatting in a data table column? For example, I want to have the cells in a specific column to turn red when the value is greater than or equal to 0.20. I have found instructions on how to do this in a report but not a data table.

1 ACCEPTED SOLUTION

Accepted Solutions
julian
Community Manager Community Manager

Re: Conditional formatting in a data table

Hi @Michelle_Martin,

 

Have you tried the Color Gradient column property? Right-click the column you want to format > Column Info. Then, add the Color Gradient column property, check the box to "Color Cell by Value," and click the gradient to set the color theme (or define your own). To have a sharp cut-off, set the Minimum and Center to the same value, and the Max to one unit higher. 

Screen Shot 2018-02-01 at 8.58.16 PM.png

 

Screen Shot 2018-02-01 at 8.58.32 PM.png

 

 

 

I hope this helps!

 

@julian

View solution in original post

5 REPLIES 5
cwillden
Super User (Alumni)

Re: Conditional formatting in a data table

Here's an example with Big Class where I color cells red if the age is > 14:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Where(:Age > 14);
:Age << Color Cells( "Red" );
dt << Clear Select;
-- Cameron Willden
Heidi
Level II

Re: Conditional formatting in a data table

Hi,

I kind of use your code, then I found if there's no cell fit the selection, the whole column will be red. 

julian
Community Manager Community Manager

Re: Conditional formatting in a data table

Hi @Michelle_Martin,

 

Have you tried the Color Gradient column property? Right-click the column you want to format > Column Info. Then, add the Color Gradient column property, check the box to "Color Cell by Value," and click the gradient to set the color theme (or define your own). To have a sharp cut-off, set the Minimum and Center to the same value, and the Max to one unit higher. 

Screen Shot 2018-02-01 at 8.58.16 PM.png

 

Screen Shot 2018-02-01 at 8.58.32 PM.png

 

 

 

I hope this helps!

 

@julian

Re: Conditional formatting in a data table

Is there anyway to automatically do this for all the columns in the data table? Through scripting or the column info tab

Solved: Standardize Attributes. Didn't see a delete button for replies so I can't delete this ... 

M. Dereviankin
txnelson
Super User

Re: Conditional formatting in a data table

It is easily done using Standardize Attributes. Select all of the columns you want to have the color gradient set for, and then go to the red triangle in the Columns Panel at the left of the data table, and select Standardize Attributes. You can then set the Color Gradient column property, and all columns selected will be set the same.
Jim