Subscribe Bookmark RSS Feed

JSL Color raw by....

bernie426

Community Trekker

Joined:

Feb 9, 2015

I would like have a jsl script that can color the rows by a certain (numeric) column.

Example, if I have a column of that is date (1/1/2015) and I will like the data pulled from the database be automatically color the raw by the date.

Could anyone get some information for my jsl request?

Thanks,

1 REPLY
pmroz

Super User

Joined:

Jun 23, 2011

New Table( "Example Colors",

     Add Rows( 3 ),

     New Column( "First Column", Numeric, Continuous, Format( "Best", 12 ),

           Set Values( [1, 2, 3] )

     ),

     New Column( "Second Column", Character, Nominal,

           Set Values( {"a", "b", "c"} )

     ),

     New Column( "Third Column", Character, Nominal,

           Set Values( {"Yellow", "Cyan", "Orange"} )

     )

);

dt = data table("Example Colors");

// Color entire columns

column(dt, "First Column") << color cells(68);

column(dt, "Second Column") << color cells("Blue");

// Color individual cells

column(dt, "Third Column") << color cells("Yellow", [1]);

column(dt, "Third Column") << color cells("Cyan", [2]);

column(dt, "Third Column") << color cells("Orange", [3]);