For some reason my Radar Chart do not update the Left Axis minimum value. I wand to set the minimum value to (-1/3) of the Maximum Scale.
Ex: if MAx Scale = 900 the Minimum should be -300.
But when I run my project and click the button, it does not work at first. I can go to ythe chart editor and see that the Axis are -0.33 of the Max scale, but for some reason the chart do not update the Minimum Left Axis. IF I click the Button again, then it works. What I am doing wrong?
This is my code (using Delphi 7 and TeeChart :
Code: Select all
//---------------------------------------------------------------------------//
procedure TForm1.Button1Click(Sender: TObject);
begin
populate_radar(Series1,Series2,'1');
Chart1.Axes.Left.AutomaticMinimum:=false;
Chart1.Axes.Left.Minimum:=Chart1.Axes.Left.Maximum * (-0.33);
end;
procedure populate_radar(S1,S2:TRadarSeries;RadarIndex: string);
var
i:integer;
begin
S1.Clear;
S2.Clear;
for i:= 0 to 30 do
S1.AddXY(i*12,1 + Random(900),'Port ' + inttostr(i));
S1.ClockWiseLabels:=true;
for i:= 0 to 30 do
S2.AddXY(i*12,1 + Random(800),'Port ' + inttostr(i));
S2.ClockWiseLabels:=true;
end;
//---------------------------------------------------------------------------//
Thanks
Ricardo abech