[Script] Comment ajouter un dégradé de couleursSalut,
Je suis bloqué ici, je veux formater ma colonne avec un dégradé de couleurs. Cependant, avec le script ci-dessous, il n'y a toujours pas de dégradé de couleurs appliqué sur ma colonne "N". Merci
R1=(dt<< Tabuler(
Afficher le panneau de configuration ( 0 ),
Afficher l'info-bulle ( 1 ),
Ajouter un tableau(
Tableau de colonnes (statistiques (N)),
Tableau de colonnes (Colonnes de regroupement ( :Nom( "test@7721" ) ), Statistiques (% de ligne, N )),
Tableau de lignes (Colonnes de regroupement ( : Rayon ) )
)
)) << Transformer en tableau de données ;
R1< "N",
Définir la propriété("Dégradé de couleur",{"Bleu à vert à rouge", Plage({0, 547, 187.945945945946})}),
Couleur de cellule par valeur
);
Re : [Script] Comment ajouter un dégradé de couleursMerci de démarrer une nouvelle discussion lorsque vous changez de sujet. Merci!
Re : [Script] Comment ajouter un dégradé de couleursVoici une façon :
NamesDefaultToHere(1);
dt = NewTable("Test", << addMultipleColumns("N", 20, Numeric));
// Add some data
Wait(3);
cols = dt << getColumnNames("String");
for(c=1, c<=NItems(cols), c++,
Column(dt, cols[c]) << Formula(RandomNormal());
);
dt << addRows(50);
// Add the colour gradient
Wait(3);
for(c=1, c<=NItems(cols), c++,
Column(dt, cols[c]) << Set Property( "Color Gradient", {"Blue to Green to Red", Range( {0, 547, 188} )} ) << Color Cell by Value;
);Re : [Script] Comment ajouter un dégradé de couleursSalut, autre question :
Actuellement j'ai 20 "N", y a-t-il un moyen de modifier le script pour que je n'aie pas besoin de changer 20 fois le "N"
R1<SPAN class="token punctuation">:</SPAN>N <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN> Set Property<SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Color Gradient"</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token punctuation">{</SPAN><SPAN class="token string">"Blue to Green to Red"</SPAN><SPAN class="token punctuation">,</SPAN> Range<SPAN class="token punctuation">(</SPAN> <SPAN class="token punctuation">{</SPAN><SPAN class="token number">0</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token number">547</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token number">187.945945945946</SPAN><SPAN class="token punctuation">}</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">}</SPAN> <SPAN class="token punctuation">)</SPAN>
<SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN> Color Cell by Value<SPAN class="token punctuation">;</SPAN>
R1<SPAN class="token punctuation">:</SPAN>N1 <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN> Set Property<SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Color Gradient"</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token punctuation">{</SPAN><SPAN class="token string">"Blue to Green to Red"</SPAN><SPAN class="token punctuation">,</SPAN> Range<SPAN class="token punctuation">(</SPAN> <SPAN class="token punctuation">{</SPAN><SPAN class="token number">0</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token number">547</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token number">187.945945945946</SPAN><SPAN class="token punctuation">}</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">}</SPAN> <SPAN class="token punctuation">)</SPAN>
<SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN> Color Cell by Value<SPAN class="token punctuation">;</SPAN>
R1<SPAN class="token punctuation">:</SPAN>N2 <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN> Set Property<SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Color Gradient"</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token punctuation">{</SPAN><SPAN class="token string">"Blue to Green to Red"</SPAN><SPAN class="token punctuation">,</SPAN> Range<SPAN class="token punctuation">(</SPAN> <SPAN class="token punctuation">{</SPAN><SPAN class="token number">0</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token number">547</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token number">187.945945945946</SPAN><SPAN class="token punctuation">}</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">}</SPAN> <SPAN class="token punctuation">)</SPAN>
<SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN> Color Cell by Value<SPAN class="token punctuation">;<BR /></SPAN>R1<SPAN class="token punctuation">:</SPAN>N3 <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN> Set Property<SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Color Gradient"</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token punctuation">{</SPAN><SPAN class="token string">"Blue to Green to Red"</SPAN><SPAN class="token punctuation">,</SPAN> Range<SPAN class="token punctuation">(</SPAN> <SPAN class="token punctuation">{</SPAN><SPAN class="token number">0</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token number">547</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token number">187.945945945946</SPAN><SPAN class="token punctuation">}</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">}</SPAN> <SPAN class="token punctuation">)</SPAN>
<SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN> Color Cell by Value<SPAN class="token punctuation">;</SPAN><SPAN class="token punctuation"> </SPAN>
Re : [Script] Comment ajouter un dégradé de couleursSalut txnelson,
Je n'ai jamais pensé à ça. Merci beaucoup pour l'information. Vous avez été d'une très grande aideRe : [Script] Comment ajouter un dégradé de couleursLa "Cellule de couleur par valeur" est un message distinct et ne doit donc pas être gérée dans le cadre de la propriété Dégradé de couleur.
R1 = (dt << Tabulate(
Show Control Panel( 0 ),
Show Tooltip( 1 ),
Add Table(
Column Table( Statistics( N ) ),
Column Table( Grouping Columns( :Name( "test@7721" ) ), Statistics( Row %, N ) ),
Row Table( Grouping Columns( :Radius ) )
)
)) << Make Into Data Table;
R1:N << Set Property( "Color Gradient", {"Blue to Green to Red", Range( {0, 547, 187.945945945946} )} )
<< Color Cell by Value;