[Skript] So fügen Sie einen Farbverlauf hinzuHallo,
Ich stecke hier fest, ich möchte meine Spalte mit Farbverlauf formatieren. Mit dem folgenden Skript wird jedoch immer noch kein Farbverlauf auf meine Spalte "N" angewendet. Danke
R1=(dt<< Tabellieren(
Systemsteuerung anzeigen ( 0 ),
Tooltip anzeigen( 1 ),
Tabelle hinzufügen (
Spaltentabelle (Statistiken ( N )),
Spaltentabelle (Spalten gruppieren (: Name ( "test@7721") ), Statistiken (Zeile %, N )),
Zeilentabelle (Spalten gruppieren (:Radius))
)
)) << In Datentabelle erstellen;
R1< "N",
Set Property("Color Gradient",{"Blue to Green to Red", Range( {0, 547, 187.945945945946})}),
Farbe Zelle nach Wert
);
Betreff: [Script] Farbverlauf hinzufügenBitte starten Sie eine neue Diskussion, wenn Sie das Thema wechseln. Danke!
Betreff: [Script] Farbverlauf hinzufügenHier ist ein Weg:
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;
);Betreff: [Script] Farbverlauf hinzufügenHallo, noch eine Frage:
Derzeit habe ich 20 "N". Gibt es eine Möglichkeit, das Skript so zu ändern, dass ich nicht 20 Mal das "N" ändern muss?
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>
Betreff: [Script] Farbverlauf hinzufügenHallo Txnelson,
Daran habe ich nie gedacht. Vielen Dank für die Informationen. Du warst eine sehr große HilfeBetreff: [Script] Farbverlauf hinzufügenDie „Farbzelle nach Wert“ ist eine separate Nachricht und muss daher nicht als Teil der Eigenschaft „Farbverlauf“ behandelt werden.
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;