<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I set a color to a specific value in a data table based on limits from other columns? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-set-a-color-to-a-specific-value-in-a-data-table-based/m-p/238546#M47129</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to color cells in jsl based on if they are over, under, or between limits. In this case Amanda is too short for the roller coaster so I want the box to be blue. Jeff is too tall, so I want the box to be red. Luke meets the requirement for the water slide, so that box can be green.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kelly_0-1576279495315.png" style="width: 588px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/20646i0F65E835B3E166D7/image-dimensions/588x150?v=v2" width="588" height="150" role="button" title="Kelly_0-1576279495315.png" alt="Kelly_0-1576279495315.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I went into column properties and tried "value colors" but that will not work for me because you must already know what colors you want to assign to what values. Certain values will need to take on different colors based on the ride limit. Sometimes a height of 66 will be green, but for a different ride it maybe too tall, and therefore red.&lt;BR /&gt;I also tried "color gradient" this will not work because it uses many shades or blue, red, and green. I only want 3 colors.&lt;BR /&gt;&lt;BR /&gt;Is there a way to make the table above using jsl?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2019 23:38:45 GMT</pubDate>
    <dc:creator>Kelly</dc:creator>
    <dc:date>2019-12-13T23:38:45Z</dc:date>
    <item>
      <title>How do I set a color to a specific value in a data table based on limits from other columns?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-set-a-color-to-a-specific-value-in-a-data-table-based/m-p/238546#M47129</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to color cells in jsl based on if they are over, under, or between limits. In this case Amanda is too short for the roller coaster so I want the box to be blue. Jeff is too tall, so I want the box to be red. Luke meets the requirement for the water slide, so that box can be green.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kelly_0-1576279495315.png" style="width: 588px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/20646i0F65E835B3E166D7/image-dimensions/588x150?v=v2" width="588" height="150" role="button" title="Kelly_0-1576279495315.png" alt="Kelly_0-1576279495315.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I went into column properties and tried "value colors" but that will not work for me because you must already know what colors you want to assign to what values. Certain values will need to take on different colors based on the ride limit. Sometimes a height of 66 will be green, but for a different ride it maybe too tall, and therefore red.&lt;BR /&gt;I also tried "color gradient" this will not work because it uses many shades or blue, red, and green. I only want 3 colors.&lt;BR /&gt;&lt;BR /&gt;Is there a way to make the table above using jsl?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 23:38:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-set-a-color-to-a-specific-value-in-a-data-table-based/m-p/238546#M47129</guid>
      <dc:creator>Kelly</dc:creator>
      <dc:date>2019-12-13T23:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set a color to a specific value in a data table based on limits from other columns?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-set-a-color-to-a-specific-value-in-a-data-table-based/m-p/238557#M47130</link>
      <description>&lt;P&gt;You can use the "Color Cells() message to change the cell color for specific cells.&amp;nbsp; See the Scripting Index for definition and examples.&amp;nbsp; Below is a simple script that covers your example data table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example.PNG" style="width: 627px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/20647i4936CB0CE5A0163F/image-size/large?v=v2&amp;amp;px=999" role="button" title="example.PNG" alt="example.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = New Table( "example",
	Add Rows( 4 ),
	New Column( "User", Character, "Nominal", Set Values( {"Amanda", "Jeff", "Kim", "Luke"} ) ),
	New Column( "Ride", Character, "Nominal", Set Values( {"Rollarcoaster", "Rollarcoaster", "Water Slide", "Water Slide"} ) ),
	New Column( "Height", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [59, 68, 55, 66] ) ),
	New Column( "Height Minimum", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [60, 60, 65, 65] ) ),
	New Column( "Height Maximum", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [65, 65, 70, 70] ) )
);
for each row(
	if(:Height Minimum &amp;lt;= :Height &amp;lt;= :Height Maximum,
		dt:Height &amp;lt;&amp;lt; color cells("Green", Row()),
		:Height &amp;lt; :Height Minimum,
		dt:Height &amp;lt;&amp;lt; color cells("Blue", Row()),
		dt:Height &amp;lt;&amp;lt; color cells("Red", Row())
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Dec 2019 23:55:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-set-a-color-to-a-specific-value-in-a-data-table-based/m-p/238557#M47130</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-12-13T23:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set a color to a specific value in a data table based on limits from other columns?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-set-a-color-to-a-specific-value-in-a-data-table-based/m-p/238558#M47131</link>
      <description>Thanks!</description>
      <pubDate>Fri, 13 Dec 2019 23:59:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-set-a-color-to-a-specific-value-in-a-data-table-based/m-p/238558#M47131</guid>
      <dc:creator>Kelly</dc:creator>
      <dc:date>2019-12-13T23:59:11Z</dc:date>
    </item>
  </channel>
</rss>

