Page 1 of 1

Left axis maximum and minimum are lost when zooming

Posted: Tue Mar 23, 2004 11:15 am
by 9335454
I've created a chart whith horizontal zooming. When I zoom, left axis
minimum and maximum are changed to arbitrary values. I can restore these
values in the OnZoom event, but this is different from version 6. Is it to
be so ?

Bruno

Posted: Wed Mar 31, 2004 7:25 pm
by Marjan
Hi, Bruno.

Yes, I'm getting the same results. I'm not 100% sure if this is as designed, but a solution is to reset axis scale in chart OnZoom event. Something like this:

Code: Select all

procedure TForm1.Chart1Zoom(Sender: TObject);
begin
  if Chart1.Zoom.Direction = tzdHorizontal then
    Chart1.Axes.Left.Automatic := True;
end;

Posted: Wed Mar 31, 2004 8:50 pm
by 9336586
Marjan:

As I said, this can be restored in the OnZoom event, but this is different from version 6.
As I have many charts with different axis settings, I must create an OnZoom event for each chart, restoring the axis settings.

Bruno

Posted: Thu Apr 01, 2004 2:41 pm
by 9333098
After doing Series1.FillSampleValues(1000), chart1.Axes.Left.Maximum is an integer value. After a Horizontal Zoom, it is a slightly larger floating value and chart1.Axes.Left.Minimum is 96.4% of chart1.Axes.Left.Maximum

Any idea why the Minimum property does not show up in Delphi's Code Completion as an available property for chart1.Axes.Left. ?