getfreeseriescolor

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
nicoconqueso
Newbie
Newbie
Posts: 4
Joined: Wed Dec 15, 2004 5:00 am
Location: Golden, CO - USA

getfreeseriescolor

Post by nicoconqueso » Fri Feb 10, 2006 6:46 pm

Hello...

I am adding around 30-100 series to a graph at runtime, but i am running out
of new colors for the new series. How can I use the GetFreeSeriesColor
function to look for more than 16 colors? Or is there another way around
this? Thanks for your help.

Cheers,
Nico

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Feb 20, 2006 11:08 am

Hi Nico,

a way around could be to define your custom Array of colors and use it like in the following code :

Code: Select all


Const ColorP:Array[1..10] of TColor= 
        ( clRed, 
          clGreen, 
          clYellow, 
          clBlue, 
          clWhite, 
          clGray, 
          clFuchsia, 
          clTeal, 
          clNavy, 
          clMaroon 
          ); 

procedure TForm1.FormCreate(Sender: TObject); 
var i,c : integer; 
begin 
c:= 0; 
for i := 0 to 19 do 
begin 
  if i mod 10= 0 then c:= 1 
  else c:= c+1; 
  Series1.AddXY(i,random(10),'',ColorP[c]); 
end; 
end;  
or if you are a source code customer modify the Array of colors and recompile the sources.

Post Reply