TChar 7.04 Change Leftaxis Min/Max
Posted: Thu Mar 24, 2005 2:58 pm
Put a TChart with a TAreaSeries to a form.
Use following code and zoom with the mouse. The Leftaxis-Minimum/maximum change every time you zoom.
procedure TForm4.Button1Click(Sender: TObject);
var
i:integer;
begin
for i := 0 to 100 do
Series1.AddXY(i,i);
Chart1.Zoom.Direction:=tzdHorizontal;
Chart1.LeftAxis.Automatic:=true;
Chart1.LeftAxis.MinimumOffset:=3;
Chart1.LeftAxis.MaximumOffset:=3;
end;
Workaround: Reset MinimumOffset and MaximumOffset in the OnZoom-event.
Use following code and zoom with the mouse. The Leftaxis-Minimum/maximum change every time you zoom.
procedure TForm4.Button1Click(Sender: TObject);
var
i:integer;
begin
for i := 0 to 100 do
Series1.AddXY(i,i);
Chart1.Zoom.Direction:=tzdHorizontal;
Chart1.LeftAxis.Automatic:=true;
Chart1.LeftAxis.MinimumOffset:=3;
Chart1.LeftAxis.MaximumOffset:=3;
end;
Workaround: Reset MinimumOffset and MaximumOffset in the OnZoom-event.