Choose Language Hide Translation Bar
Community Trekker

JSL Color raw by....

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?


0 Kudos
Super User

Re: JSL Color raw by....

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]);