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.
TChar 7.04 Change Leftaxis Min/Max
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Achim,
Maybe setting your axis not to be automatically setted can help you. You can do it using something like:
Maybe setting your axis not to be automatically setted can help you. You can do it using something like:
Code: Select all
With Chart1.LeftAxis do
begin
Automatic:=false;
AutomaticMaximum:=false;
AutomaticMinimum:=false;
SetMinMax(AxisMin,AxisMax);
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 |