<?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 Re: Couleur dynamique in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Couleur-dynamique/m-p/722597#M90492</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/44672"&gt;@hcarr01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I'm not exactly sure what it is you're wanting to do, but I think I understand. This is one way to do it by using the JSL code below -- you can see how it's done on the Big Class.jmp file. Here, I just chose to color :age &amp;lt;=14 red and &amp;gt;=15 green.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to here(1);

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

For(i=1, i&amp;lt;=NRows(), i++,
	If(
		:age[i]&amp;lt;=14,
		:age&amp;lt;&amp;lt;Color Cells("red", i),
		:age[i]&amp;gt;=15,
		:age&amp;lt;&amp;lt;Color Cells("green", i),
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; Another option would be to set a Spec Limit for the column and use Analyze &amp;gt; Quality and Process &amp;gt; Manage Limits and then use the red hot-button to color out of spec cells. The default here is blue if &amp;gt; USL and red if &amp;lt; LSL, and I don't think you can edit this in the preferences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of these options should get you to where you want to go, I think. If you want to color the row state, then you could also try the Color by Column() command. See the Scripting Index example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Color by Column( :Age );
Wait( 2 );
dt &amp;lt;&amp;lt; Color Rows by Row State;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; The last command will also color the rows according to how they've been assigned in Color by Column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Definitely one of these options should get you what you're after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2024 19:27:01 GMT</pubDate>
    <dc:creator>SDF1</dc:creator>
    <dc:date>2024-02-07T19:27:01Z</dc:date>
    <item>
      <title>Couleur dynamique</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-dynamique/m-p/722567#M90488</link>
      <description>Bonjour à tous,&lt;BR /&gt;&lt;BR /&gt;J’utilise le constructeur de graphique dans JMP.&lt;BR /&gt;A partir des colonnes de ma base de données, je crée des mesures (indicateurs) directement dans le constructeur de graphique pour les afficher.&lt;BR /&gt;&lt;BR /&gt;Par exemple avec ma colonne A et ma colonne B, je crée la mesure avec la formule A-B.&lt;BR /&gt;Cette mesure fait référence à un indicateur que je rajoute dans mon graphique juste en dessous du titre.&lt;BR /&gt;&lt;BR /&gt;Le problème est que j’aimerais donner une couleur à la mesure que je crée en fonction de la valeur de cette mesure.&lt;BR /&gt;&lt;BR /&gt;J’aimerais pouvoir mettre le texte en vert si la mesure est &amp;gt; 0 et mettre le texte en rouge si la mesure est &amp;lt; 0.&lt;BR /&gt;&lt;BR /&gt;Pour le moment, je peux associer une couleur à la mesure mais la couleur n’est pas dynamique elle ne change pas en fonction des valeurs.&lt;BR /&gt;&lt;BR /&gt;Existe-t-il un moyen pour contourner ce problème ?</description>
      <pubDate>Wed, 07 Feb 2024 18:13:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-dynamique/m-p/722567#M90488</guid>
      <dc:creator>hcarr01</dc:creator>
      <dc:date>2024-02-07T18:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur dynamique</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-dynamique/m-p/722597#M90492</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/44672"&gt;@hcarr01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I'm not exactly sure what it is you're wanting to do, but I think I understand. This is one way to do it by using the JSL code below -- you can see how it's done on the Big Class.jmp file. Here, I just chose to color :age &amp;lt;=14 red and &amp;gt;=15 green.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to here(1);

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

For(i=1, i&amp;lt;=NRows(), i++,
	If(
		:age[i]&amp;lt;=14,
		:age&amp;lt;&amp;lt;Color Cells("red", i),
		:age[i]&amp;gt;=15,
		:age&amp;lt;&amp;lt;Color Cells("green", i),
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; Another option would be to set a Spec Limit for the column and use Analyze &amp;gt; Quality and Process &amp;gt; Manage Limits and then use the red hot-button to color out of spec cells. The default here is blue if &amp;gt; USL and red if &amp;lt; LSL, and I don't think you can edit this in the preferences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of these options should get you to where you want to go, I think. If you want to color the row state, then you could also try the Color by Column() command. See the Scripting Index example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Color by Column( :Age );
Wait( 2 );
dt &amp;lt;&amp;lt; Color Rows by Row State;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; The last command will also color the rows according to how they've been assigned in Color by Column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Definitely one of these options should get you what you're after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 19:27:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-dynamique/m-p/722597#M90492</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2024-02-07T19:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur dynamique</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-dynamique/m-p/722760#M90502</link>
      <description>&lt;P&gt;&lt;FONT&gt;Dans le constructeur de graphique, je créé une mesure à partir de la capture ci-dessous :&lt;/FONT&gt;&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="hcarr01_0-1707376359074.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60983i1C0CE535786650FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hcarr01_0-1707376359074.png" alt="hcarr01_0-1707376359074.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Une fois que la nouvelle mesure est créé par exemple &lt;EM&gt;Transformation[B]&lt;/EM&gt;&lt;FONT&gt;&lt;FONT&gt; = A - B je la rajoute &lt;/FONT&gt;dans &lt;FONT&gt;le graphique comme dans capture ci-dessous :&lt;/FONT&gt;&lt;/FONT&gt;&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="hcarr01_1-1707376514394.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60984i35E48421EE5F5097/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hcarr01_1-1707376514394.png" alt="hcarr01_1-1707376514394.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Est-il possible de modifier la couleur de la mesure &lt;EM&gt;Transformation[B]&lt;/EM&gt; en fonction des valeurs ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J'ai essayé avec le script suivant mais rien ne se passe, aucune couleur ne s'affiche sur le graphique !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Transform Column(
		"indicateurs (A-B)",
		Formula( Col Sum( :A ) - Col Sum( :B ) )
	),
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	If( indicateurs (A-B) &amp;lt; 0,
			Title Fill Color( "Light Red" ),
			Title Frame Color( "Light Red" ),
			Level Fill Color( {255, 193, 202} ),
			Level Frame Color( "Light Red" ),
			Level Spacing Color( "Light Red" ),
			,
			Title Fill Color( "Light Green" ),
			Title Frame Color( "Light Green" ),
			Level Fill Color( {190, 255, 202} ),
			Level Frame Color( "Light Green" ),
			Level Spacing Color( "Light Green" ),			
	),
	Variables(
		X( :Mois ),
		Y( :A ),
		Y( :B, Position( 1 ) ),
		Group X( :"indicateurs (A-B)"n )
	),
	Elements( Bar( X, Y( 1 ), Y( 2 ), Legend( 5 ), Label( "Label by Value" ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				5,
				Properties( 0, {Fill Color( 51 )}, Item ID( "A", 1 ) ),
				Properties( 1, {Fill Color( 21 )}, Item ID( "B", 1 ) )
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2024 10:26:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-dynamique/m-p/722760#M90502</guid>
      <dc:creator>hcarr01</dc:creator>
      <dc:date>2024-02-08T10:26:39Z</dc:date>
    </item>
  </channel>
</rss>

