hi
im using a chart which can be pie or line or bar
for line, i can change the series.color in order to set the color
i know that i can change the series.valuecolor[idx] for pie
but when can i know all the value number of the pie and change each and every one of them?
i tried:
for i := 0 to series.valuelist.count - 1 do
series.valuecolor := clColor;
but in the count i got 2. while there were much more than 2
what am i missing?
thanks
PieChart colors
Hi.
The Valuelist.Count returns number of different valuelists (not points) in series. For pie series, this is 2 (XValues, Yvalues). To get the number of points (pies), you have to use slightly different code:
The Valuelist.Count returns number of different valuelists (not points) in series. For pie series, this is 2 (XValues, Yvalues). To get the number of points (pies), you have to use slightly different code:
Code: Select all
for i := 0 to pieSeries1.Count - 1 do
pieSeries.ValueColor[i] := yourcolor comes here
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
this is the code:
for x := 0 to Series.Count - 1 do
case x of
0: Series.ValueColor[x] := ColorSchema.GraphSeries1_Color;
1: Series.ValueColor[x] := ColorSchema.GraphSeries2_Color;
2: Series.ValueColor[x] := ColorSchema.GraphSeries3_Color;
3: Series.ValueColor[x] := ColorSchema.GraphSeries4_Color;
4: Series.ValueColor[x] := ColorSchema.GraphSeries5_Color;
5: Series.ValueColor[x] := ColorSchema.GraphSeries6_Color;
6: Series.ValueColor[x] := ColorSchema.GraphSeries7_Color;
7: Series.ValueColor[x] := ColorSchema.GraphSeries8_Color;
8: Series.ValueColor[x] := ColorSchema.GraphSeries9_Color;
9: Series.ValueColor[x] := ColorSchema.GraphSeries10_Color;
end;
end;
but its not affecting the pie colors
for x := 0 to Series.Count - 1 do
case x of
0: Series.ValueColor[x] := ColorSchema.GraphSeries1_Color;
1: Series.ValueColor[x] := ColorSchema.GraphSeries2_Color;
2: Series.ValueColor[x] := ColorSchema.GraphSeries3_Color;
3: Series.ValueColor[x] := ColorSchema.GraphSeries4_Color;
4: Series.ValueColor[x] := ColorSchema.GraphSeries5_Color;
5: Series.ValueColor[x] := ColorSchema.GraphSeries6_Color;
6: Series.ValueColor[x] := ColorSchema.GraphSeries7_Color;
7: Series.ValueColor[x] := ColorSchema.GraphSeries8_Color;
8: Series.ValueColor[x] := ColorSchema.GraphSeries9_Color;
9: Series.ValueColor[x] := ColorSchema.GraphSeries10_Color;
end;
end;
but its not affecting the pie colors
Hi,
using the following code works fine here (v7.02) :
If you still having problems could you please post an example into the news://steema.net/steema.public.attachments newsgroup with which I can reproduce the problem "as is" here ?
using the following code works fine here (v7.02) :
Code: Select all
procedure TForm1.BitBtn1Click(Sender: TObject);
var x : integer;
begin
for x := 0 to Series1.Count - 1 do
case x of
0: Series1.ValueColor[x] := RGB(255,255,x*20);
1: Series1.ValueColor[x] := RGB(255,255,x*20);
2: Series1.ValueColor[x] := RGB(255,255,x*20);
3: Series1.ValueColor[x] := RGB(255,255,x*20);
4: Series1.ValueColor[x] := RGB(255,255,x*20);
5: Series1.ValueColor[x] := RGB(255,255,x*20);
6: Series1.ValueColor[x] := RGB(255,255,x*20);
7: Series1.ValueColor[x] := RGB(255,255,x*20);
8: Series1.ValueColor[x] := RGB(255,255,x*20);
9: Series1.ValueColor[x] := RGB(255,255,x*20);
end;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com