I have a chart with number of line series up to 25. These series are partitioned into different group.
The problem is that the lines have automaic different colors in the first ~20 series, but they become alway gray colors in the last few line series.
Automatic color of line series
Hi Mike,
yes, there's a predefined array of colors as default. In case you want to have more different colors you can always define a custom array of colors to use. It can be done as bellow :
yes, there's a predefined array of colors as default. In case you want to have more different colors you can always define a custom array of colors to use. It can be done as bellow :
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
t:integer;
begin
SetLength(Chart1.ColorPalette,Length(RainbowPalette));
for t:=0 to Length(RainbowPalette)-1 do
Chart1.ColorPalette[t]:=RainbowPalette[t];
end;
Pep Jorge
http://support.steema.com
http://support.steema.com
Thanks, Pep.
I get to know the colorpallete.
using Rainbow pallete, the colors of lines are quite close to each other. Thus, I still use default pallete, and set line.color:=GetDefaultColor(I mod Length(TeeProcs.ColorPalette)), so that color will repeat that in the colorpalette when the number of lines >length of colorpalette. I think there may be a bug with getdefaultcolor.
By the way, I did not receive the notification email.
Mike
I get to know the colorpallete.
using Rainbow pallete, the colors of lines are quite close to each other. Thus, I still use default pallete, and set line.color:=GetDefaultColor(I mod Length(TeeProcs.ColorPalette)), so that color will repeat that in the colorpalette when the number of lines >length of colorpalette. I think there may be a bug with getdefaultcolor.
By the way, I did not receive the notification email.
Mike
Hi Mike,
ok, yes you're correct, it's a bug (added on our bug list), once it arrives to 20 it should start again with the first color in the list.
I'm glad to hear you find the workaround.
ok, yes you're correct, it's a bug (added on our bug list), once it arrives to 20 it should start again with the first color in the list.
I'm glad to hear you find the workaround.
Pep Jorge
http://support.steema.com
http://support.steema.com