Page 1 of 1

Lots and lots of bar colours

Posted: Mon Apr 19, 2004 2:04 pm
by 9336918
Good afternnon

Thank y'a;; for your pervious help.

If I have say 150 bars then the colours seem to fizzle out after say 15, can I reuse the same sequence so it looks pretty as opposed to red,green, blue, cyan, orange,orange,orange,orange,orange....

Morton

D7, Teechart 7

Posted: Mon Apr 19, 2004 3:13 pm
by Pep
Hi Morton,

I guess the only way to change this is to change source code and recompile TC packages (if you are source code customer). Or create your
custome array of colors.

Posted: Tue Apr 20, 2004 5:03 pm
by 9336918
Erm, like how please....

Posted: Tue Apr 20, 2004 6:40 pm
by Pep
Hi Morton,

you can 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;

Using Custom Palette

Posted: Thu Sep 22, 2005 11:43 am
by 9231947
Hi Josep,
Instead of using an array of colours, would it not be better to use the custom palette method? Could you please give an exmple using TChartSeries (Bar or something) with custom palette?

Regards john.

Posted: Mon Sep 26, 2005 8:19 am
by Pep
Hi john,

in TeeChart v6 and above the ColorPalette is declared as
var ColorPalette:Array of TColor;

so you can simply access/change color palette without need to recompile TeeChart sources.