Hi,
I am try to use TAreaSeries in three different colour, the X axis is based on date & time, then there are three different time frames, in each time frame, I need TAreaSeries in different colors. Is it possible ? thanks.
Daniel
Is it possible for TAreaSeries to display in three color ?
Hi Daniel,
You could set series' property "ColorEachPoint" to true and then assign the desired color to each point. Here is an example:
You could set series' property "ColorEachPoint" to true and then assign the desired color to each point. Here is an example:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var i, FirstRange, SecondRange: Integer;
begin
Series1.ColorEachPoint := true;
Series1.FillSampleValues(30);
Series1.XValues.DateTime := true;
Chart1.Draw;
FirstRange := 10;
SecondRange := 20;
for i:=0 to FirstRange-1 do
begin
Series1.ValueColor[i]:= RGB(176,0,0);
end;
for i:=FirstRange to SecondRange-1 do
begin
Series1.ValueColor[i]:= clRed;
end;
for i:=SecondRange to Series1.Count-1 do
begin
Series1.ValueColor[i]:= rgb(255,100,100);
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |