TPointSeries and colors of pointer
Posted: Mon Sep 10, 2012 7:40 am
When I use the code
I can change the color of the point afterwards. BUT if i use the code
I CANNOT change the color - see the code below. The code in Button1 is OK - the code in Button2 is Not ok....
I'm using CodeGear™ Delphi® 2007 for Win32® R2 Version 11.0.2902.10471 with Steema Teechart Pro v2012.05.120327 32BIT VCL
Code: Select all
AddXY(xvalues,yvalues);
Code: Select all
AddXY(xvalue,yvalue,'',cllime);
I'm using CodeGear™ Delphi® 2007 for Win32® R2 Version 11.0.2902.10471 with Steema Teechart Pro v2012.05.120327 32BIT VCL
Code: Select all
procedure TForm10.Button1Click(Sender: TObject);
var
i : integer;
begin
Chart1.RemoveAllSeries;
Chart1.FreeAllSeries();
Chart1.Title.Text.Clear;
Chart1.Legend.Shadow.Visible := false;
Chart1.View3D := false;
Chart1.BottomAxis.DateTimeFormat := 'yyyy-mm-dd ' + #13 + 'hh:nn:ss';
Chart1.BottomAxis.Automatic := true;
Chart1.AddSeries(TPointSeries.Create(self));
Chart1[0].ParentChart := Chart1;
Chart1[0].XValues.DateTime := true;
for I := 0 to 9 do
Chart1[0].AddXY(now+i/10,i);
if Chart1.SeriesCount >0 then
with Chart1[0] as TpointSeries do
begin
Pointer.Color := clred;
Pointer.Brush.Color := clred;
Pointer.Brush.Style := bsSolid;
seriescolor := clred;
end;
end;
procedure TForm10.Button2Click(Sender: TObject);
var
i : integer;
begin
Chart1.RemoveAllSeries;
Chart1.FreeAllSeries();
Chart1.Title.Text.Clear;
Chart1.Legend.Shadow.Visible := false;
Chart1.View3D := false;
Chart1.BottomAxis.DateTimeFormat := 'yyyy-mm-dd ' + #13 + 'hh:nn:ss';
Chart1.BottomAxis.Automatic := true;
Chart1.AddSeries(TPointSeries.Create(self));
Chart1[0].ParentChart := Chart1;
Chart1[0].XValues.DateTime := true;
for I := 0 to 9 do
Chart1[0].AddXY(now+i/10,i,'',cllime);
if Chart1.SeriesCount >0 then
with Chart1[0] as TpointSeries do
begin
Pointer.Color := claqua;
Pointer.Brush.Color := claqua;
Pointer.Brush.Style := bsSolid;
seriescolor := claqua;
end;
end;