cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
KaylaSue
Level I

JSL - How to Assign Marker Color based on Conditional Value

I am trying to figure out how to script marker colors to specific rows based on a conditional value within one of the columns.

 

For instance, how would I make the marker color red for all rows with a "Hold Time" (column name) value of < 6 hours.

 

Note that I know how to do this from within a graph/graph builder, but I am trying to figure out to put it in a script to pre-emptively search for all values < 6 hours in the data table and color the rows accordingly such that if my imported data table gets updated with additional data, the script is able to perform the color coding automatically. 

1 REPLY 1
txnelson
Super User

Re: JSL - How to Assign Marker Color based on Conditional Value

Here is one way of doing it:

Names Default To Here( 1 );
dt = Current Data Table();
theRows = dt << get rows where( :Hold Time < 6 );
For Each( {targetRow}, theRows,
	Row State( targetRow ) = Color State( green )
);
Jim

Recommended Articles