<?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 sur des indicateurs in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826380#M100738</link>
    <description>&lt;P&gt;Is each "Item" in a separate column?&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Yes one item by column&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Are your data in sequential order"&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Yes it can be sort in a sequential order&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How many different "Items" are there?&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;A lot of...&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Should the report only have 3 different items in each row of the report?&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2025 07:54:47 GMT</pubDate>
    <dc:creator>hcarr01</dc:creator>
    <dc:date>2025-01-09T07:54:47Z</dc:date>
    <item>
      <title>Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826357#M100729</link>
      <description>&lt;P&gt;Bonjour à tous,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J'essaye de créer un rapport dans JMP permettant de voir des dérives sur certains processus.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Par exemple, j'étudie 6 items dans mon processus et j'aimerais avoir un indicateur avec des couleurs :&lt;/P&gt;&lt;P&gt;&amp;nbsp;- si 5 points consecutifs (ou plus) supérieur à 3sigma : couleur rouge&lt;/P&gt;&lt;P&gt;&amp;nbsp;- si 3 points consecutifs (ou plus) supérieur à 3sigma : couleur jaune&lt;/P&gt;&lt;P&gt;&amp;nbsp;- sinon couleur verte&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Et ensuite j'aimerais pouvoir afficher dans un rapport quelque chose comme ceci par item en fonction des couleurs des indicateurs :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hcarr01_0-1736352486062.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71753i879B80C9AD5F8EEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hcarr01_0-1736352486062.png" alt="hcarr01_0-1736352486062.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comment je pourrais procéder pour avoir quelque chose de similaire sur JMP ?&lt;/P&gt;&lt;P&gt;Merci pour votre réponse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 16:10:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826357#M100729</guid>
      <dc:creator>hcarr01</dc:creator>
      <dc:date>2025-01-08T16:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826367#M100730</link>
      <description>&lt;P&gt;Is each "Item" in a separate column?&lt;/P&gt;
&lt;P&gt;Are your data in sequential order"&lt;/P&gt;
&lt;P&gt;How many different "Items" are there?&lt;/P&gt;
&lt;P&gt;Should the report only have 3 different items in each row of the report?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 16:40:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826367#M100730</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-01-08T16:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826368#M100731</link>
      <description>&lt;P&gt;If you want to have a table, use data table and color the cells. In graph builder you might be able to use heatmap. If you want to script it, you have many different options where you can set the background color.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 16:46:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826368#M100731</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-01-08T16:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826380#M100738</link>
      <description>&lt;P&gt;Is each "Item" in a separate column?&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Yes one item by column&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Are your data in sequential order"&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Yes it can be sort in a sequential order&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How many different "Items" are there?&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;A lot of...&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Should the report only have 3 different items in each row of the report?&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 07:54:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826380#M100738</guid>
      <dc:creator>hcarr01</dc:creator>
      <dc:date>2025-01-09T07:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826382#M100739</link>
      <description>&lt;P&gt;One simple option is something like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(6),
	Compress File When Saved(1),
	New Column("item",
		Character,
		"Nominal",
		Set Values({"ITEM1", "ITEM2", "ITEM3", "ITEM4", "ITEM5", "ITEM6"})
	),
	New Column("status",
		Character,
		"Nominal",
		Set Values({"Green", "Green", "Red", "Yellow", "Green", "Red"})
	)
);

lub = Lineup Box(N Col(3));

For Each Row(dt,
	Eval(EvalExpr(
		lub &amp;lt;&amp;lt; Append(
			Text Box(:item, &amp;lt;&amp;lt; Background Color(Expr(:status)))
		)		
	));
);

nw = New Window("",
	lub
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1736410983729.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71756i500C8D8B691D5E5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1736410983729.png" alt="jthi_0-1736410983729.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 08:23:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826382#M100739</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-01-09T08:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826384#M100740</link>
      <description>&lt;P&gt;Merci pour la réponse, j'essaye de créer une table similaire avec les indicateurs rouge, jaune et vert.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mon objectif est de créer :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; - if 5 consecutive points (or more) are red (above 3 sigma) so the color of the last point is red&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; - if 3 consecutive points (or more) are red (above 3 sigma) so the color of the last point is yellow&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; - otherwise green color&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;En pièce-jointe vous pouvez trouver une table qui sert d'exemple, j'ai créé le script suivant mais sans succès :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = current data table();

// Créez une nouvelle colonne pour l'indicateur
dt &amp;lt;&amp;lt; New Column("Indicateur", Character, Nominal);



// Boucle pour calculer l'indicateur ligne par ligne
For(i = 1, i &amp;lt;= N Rows(5), i++, 
    // Récupérer les 5 dernières valeurs de l'indicateur
    last_five = dt:status[i,5];  //
    
    // Comptez le nombre de "rouge"
    count_rouge = N Items( last_five == "rouge");
    
    // Attribuer une couleur en fonction des règles
    If(count_rouge == 5,
        dt:Indicateur Global[i] = "rouge"; // 5 rouges
    ,
        If(count_rouge &amp;gt;= 3,
            dt:Indicateur Global[i] = "jaune"; // 3 ou plus rouges
        ,
            dt:Indicateur Global[i] = "vert"; // Sinon vert
        );
    );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jan 2025 11:00:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826384#M100740</guid>
      <dc:creator>hcarr01</dc:creator>
      <dc:date>2025-01-09T11:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826388#M100742</link>
      <description>&lt;P&gt;I think this code does what you want:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "testcolors", Add Rows( 15 ),
	New Column( "Article", Character, "Nominal",
		Set Values( {"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}
		) ),
	New Column( "Item", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] )
	),
	New Column( "status", Character, "Nominal",
		Set Values(
			{"red", "red", "red", "green", "green", "red", "red", "red", "red",
			"red", "red", "green", "red", "red", "red"}
		)
	),
// Créez une nouvelle colonne pour l'indicateur
	New Column("Indicateur", Character, Nominal)
);

one_color = "xyz";
icolor = 0;

for (i = 1, i &amp;lt;= nrows(dt), i++,
	one_color = dt:status[i];
	if (one_color == "red",
		icolor++;
	// else
	,
		if (icolor &amp;gt;= 5,
			dt:Indicateur &amp;lt;&amp;lt; Color Cells( "Red", i-1 );
			icolor = 0;
		// else
			,
			icolor &amp;gt;= 3,
			dt:Indicateur &amp;lt;&amp;lt; Color Cells( "Yellow", i-1 );
			icolor = 0;
		);
	);
);
// Handle the last row
if (icolor &amp;gt;= 5,
	dt:Indicateur &amp;lt;&amp;lt; Color Cells( "Red", i-1 );
// else
	,
	icolor &amp;gt;= 3,
	dt:Indicateur &amp;lt;&amp;lt; Color Cells( "Yellow", i-1 );
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1736426492609.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71759i5411622617A85E9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1736426492609.png" alt="pmroz_0-1736426492609.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 12:41:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826388#M100742</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2025-01-09T12:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826390#M100743</link>
      <description>&lt;P&gt;I remain confused.&amp;nbsp; However, given the data table you supplied, which appears to be a table that has the results of what you are attempting to calculate, one can easily color the cells for your Indicateur column&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1736426170368.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71758iEFDE9B8B19208B69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1736426170368.png" alt="txnelson_0-1736426170368.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=current data table();
dt &amp;lt;&amp;lt; New Column("Indicateur", Character, Nominal);

:indicateur &amp;lt;&amp;lt; color cells("red",dt&amp;lt;&amp;lt;get rows where(:status=="red"));
:indicateur &amp;lt;&amp;lt; color cells("yellow",dt&amp;lt;&amp;lt;get rows where(:status=="yellow"));
:indicateur &amp;lt;&amp;lt; color cells("green",dt&amp;lt;&amp;lt;get rows where(:status=="green"));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or can create a separate report&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1736426542617.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71760iF5D0EC4B9B8E8098/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1736426542617.png" alt="txnelson_1-1736426542617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw=new window("colors", lub=lineupbox(ncol(3)));

For Each Row(dt,
	Eval(EvalExpr(
		lub &amp;lt;&amp;lt; Append(
			Text Box("Item" || char(:item), &amp;lt;&amp;lt; Background Color(Expr(:status)))
		)		
	));
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jan 2025 12:42:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826390#M100743</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-01-09T12:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826585#M100767</link>
      <description>&lt;P&gt;Bonjour, merci pour la réponse cela fonctionne bien sur cette base test !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J'essaye de généraliser ce script lorsque j'ai plusieurs articles. Les indicateurs couleur sont créés par article.&lt;/P&gt;&lt;P&gt;J'utilise le script suivant mais je n'obtiens pas le bon résultat final :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = current data table();

// Créez une nouvelle colonne pour l'indicateur
dt &amp;lt;&amp;lt; New Column("Indicateur", Character, Nominal)
	
	
one_color = "xyz";
icolor = 0;


Summarize(dt, unique_objects = by(:Article));
m_obs = dt[0, "Article"];

For each( {unique_objects}, m_obs,
for (i = 1, i &amp;lt;= nrows(dt), i++,
	one_color = dt:status[i];
	if (one_color == "red",
		icolor++;
	// else
	,
		if (icolor &amp;gt;= 5,
			dt:Indicateur &amp;lt;&amp;lt; Color Cells( "Red", i-1 );
			icolor = 0;
		// else
			,
			icolor &amp;gt;= 3,
			dt:Indicateur &amp;lt;&amp;lt; Color Cells( "Yellow", i-1 );
			icolor = 0;
		);
	);
);
// Handle the last row
if (icolor &amp;gt;= 5,
	dt:Indicateur &amp;lt;&amp;lt; Color Cells( "Red", i-1 );
// else
	,
	icolor &amp;gt;= 3,
	dt:Indicateur &amp;lt;&amp;lt; Color Cells( "Yellow", i-1 );
);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Le résultat obtenu :&amp;nbsp;&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-1736504549624.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71793iDD007136CEB728A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hcarr01_0-1736504549624.png" alt="hcarr01_0-1736504549624.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;La ligne 18 on devrait avoir la couleur jaune car il y a 3 points consecutifs rouge pour l'article B...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 10:23:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826585#M100767</guid>
      <dc:creator>hcarr01</dc:creator>
      <dc:date>2025-01-10T10:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826607#M100773</link>
      <description>&lt;P&gt;Here is my approach&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1736510845084.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71800i8B18721473804DCB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1736510845084.png" alt="txnelson_0-1736510845084.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = current data table();

// Créez une nouvelle colonne pour l'indicateur
dt &amp;lt;&amp;lt; New Column("Indicateur", Character, Nominal);
	
one_color = "xyz";
icolor = 0;

For Each Row(
	// If the value of Article has changed set icolor to 0
	If( Lag( :Article ) != :Article,
		icolor = 0
	);
	// If status is red, increment icolor else set it back to zero
	If( :status == "red",
		icolor++,
		icolor = 0
	);
	// Check for the number of icolor
	// Set the value for the cell to the appropriate color
	// When a color is specified remove no longer correct cell colors
	// for previous rows
	If(
		icolor &amp;gt;= 5,
			dt:Indicateur &amp;lt;&amp;lt; color cells("red",row());
			dt:Indicateur &amp;lt;&amp;lt; color cells("",row()-1);
			If( icolor == 5,
				dt:Indicateur &amp;lt;&amp;lt; color cells("",row()-2);
			);,
		icolor &amp;gt;= 3,
			dt:Indicateur &amp;lt;&amp;lt; color cells("yellow",row());
			dt:Indicateur &amp;lt;&amp;lt; color cells("",row()-1);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jan 2025 12:21:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/826607#M100773</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-01-10T12:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/827047#M100843</link>
      <description>&lt;P&gt;Merci pour votre réponse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cela fonctionne mais pas exactement comme cela devrait.&lt;/P&gt;&lt;P&gt;J'ai essayé de faire des modifications sur la deuxième boucle if mais je ne trouve pas la solution.&lt;/P&gt;&lt;P&gt;Voici ci-dessous le résultat auquel j'aimerais arriver exactement :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hcarr01_0-1736757519798.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71874iC5192378429BC69B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hcarr01_0-1736757519798.png" alt="hcarr01_0-1736757519798.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 08:40:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/827047#M100843</guid>
      <dc:creator>hcarr01</dc:creator>
      <dc:date>2025-01-13T08:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/827067#M100848</link>
      <description>&lt;P&gt;My last script assumed you only wanted the last row in a series to retain the calculated color.&amp;nbsp; To accomplish what your latest specification, I just commented out the lines that reset the colors if the script determined it wasn't the last row in the series.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1736771162139.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71877iED3FBADA4A36065C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1736771162139.png" alt="txnelson_0-1736771162139.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = current data table();

// Créez une nouvelle colonne pour l'indicateur
dt &amp;lt;&amp;lt; New Column("Indicateur", Character, Nominal);
	
one_color = "xyz";
icolor = 0;

For Each Row(
	// If the value of Article has changed set icolor to 0
	If( Lag( :Article ) != :Article,
		icolor = 0
	);
	// If status is red, increment icolor else set it back to zero
	If( :status == "red",
		icolor++,
		icolor = 0
	);
	// Check for the number of icolor
	// Set the value for the cell to the appropriate color
	// When a color is specified remove no longer correct cell colors
	// for previous rows
	If(
		icolor &amp;gt;= 5,
			dt:Indicateur &amp;lt;&amp;lt; color cells("red",row());
			//dt:Indicateur &amp;lt;&amp;lt; color cells("",row()-1);
			/*If( icolor == 5,
				dt:Indicateur &amp;lt;&amp;lt; color cells("",row()-2);
			);*/,
		icolor &amp;gt;= 3,
			dt:Indicateur &amp;lt;&amp;lt; color cells("yellow",row());
			//dt:Indicateur &amp;lt;&amp;lt; color cells("",row()-1);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Jan 2025 12:26:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/827067#M100848</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-01-13T12:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Couleur sur des indicateurs</title>
      <link>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/827255#M100876</link>
      <description>&lt;P&gt;I'm not sure how this is anymore related to the initial question, but there is a bit different option for creating the indicator column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt &amp;lt;&amp;lt; New Column("Color", Character, Nominal, 
	Set Property(
		"Value Colors",
		{"Green" = "Green", "Red" = "Red", "Yellow" = "Yellow"}
	),
	Color Cell By Value,
	Formula(
		is_red = :status == "red";
		
		If(Row() == 1,
			red_count = is_red;
		);
		
		If(:Article != Lag(:Article, 1) | is_red == 0,
			red_count = is_red;
		,
			red_count = red_count + is_red;
		);
		If(red_count &amp;gt;= 5,
			"Red";
		, red_count &amp;gt;= 3,
			"Yellow"
		,
			"Green"
		);
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 07:26:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Couleur-sur-des-indicateurs/m-p/827255#M100876</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-01-14T07:26:11Z</dc:date>
    </item>
  </channel>
</rss>

