I am displaying pixel images on a TColorGridSeries. I would like to be able to change the color scale for the Y axis. I am able to assign colors to specific Y values using the AddPalette method (UsePalette). I am also able to set the start, mid and end colors (UseColorRange) successfully.
You also have some predefined color schemes. Is there a way for me to define my own color scheme?
Thanks in advance!
Color Scale for TColorGridSeries
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi leaf,
You can define your custom Array of colors and use it like in the following code:
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;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |