BookmarkSubscribe
Choose Language Hide Translation Bar
devinstomp
Community Trekker

JMP 14 Coloring Spanned Column

Is there a way to color a column box nested in a col span box dynamically? For example, say I could have any number of rows and I want to only color values over 80 red, is this possible like it is for a data table?

 

I have included the code I am using to color a data table and show it in a results window. As well, I have attached a sample of what my spanned column table would look like. I would like to do the same coloring I’m doing to the data table on the spanned column table in the report window. Please help, thanks!

list = {12.5,55,23,99,87.6,77};
dt = New Table( "TEST",
	Add Rows( 6 ),
	New Column( "A", Numeric, "Continuous", Format( "Best", 12 ), Set Values( list ) ),
);
fail = dt << Get Rows Where( as column(column(dt,"A")) > 80);
Column(dt, "A") << color cells(Red, fail);

nw3 = New Window( "Results",
	Table Box(
		String Col Box( "Time", {"2","4","8","16","32","48"} ),						
		Col Span Box(
			"REF",
			Number Col Box( "CV", {12.5,55,23,99,87.6,77}),
			Number Col Box( "Mean", {12.5,55,23,24,87.6,77})
		),
		Col Span Box(
			"TEST",
			Number Col Box( "CV", {12.5,99,23,24,87.6,99}),
			Number Col Box( "Mean", {12.5,55,23,24,87.6,77})
		)
	),
	dt << Get As Report()
);
Close(dt, nosave);
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
gzmorgan0
Super User

Re: JMP 14 Coloring Spanned Column

The table message Get As Report() which is new to me, provided a path on how to do this. It takes a little work, but not too bad.  Here is the resulting window.

image.png 

The script is attached. The key is:

  • make a data table and color cells
  • get the data table as a report
  • change the column headings
  • Create a window with a TableBox and ColSpanBox and use the dtr table report for each NumberColBox.

I have also attached a table with embedded scripts that demonstrates how to use selected row colors.  

The wish list item which has already been reported is to be able to color cells or set colors to rows of NumberColBox.

 

2 REPLIES 2
gzmorgan0
Super User

Re: JMP 14 Coloring Spanned Column

The table message Get As Report() which is new to me, provided a path on how to do this. It takes a little work, but not too bad.  Here is the resulting window.

image.png 

The script is attached. The key is:

  • make a data table and color cells
  • get the data table as a report
  • change the column headings
  • Create a window with a TableBox and ColSpanBox and use the dtr table report for each NumberColBox.

I have also attached a table with embedded scripts that demonstrates how to use selected row colors.  

The wish list item which has already been reported is to be able to color cells or set colors to rows of NumberColBox.

 

devinstomp
Community Trekker

Re: JMP 14 Coloring Spanned Column

Excellent, this is exactly what I needed. Thank you!

0 Kudos