Page 1 of 1

Axis value from chart

Posted: Tue Feb 02, 2010 6:32 pm
by 9047441
I have an application where events are shown in a Gant graph. I print the events in a list and from the graph.
When scrolling and zooming the graph the bottom axis (date) changes accordingly.
I would like to retrieve the max/min dates from the bottom axis so that the printed lists reflects the same time span as the graph.

Any idea how to do this?

Re: Axis value from chart

Posted: Wed Feb 03, 2010 9:18 am
by yeray
Hi asgo,

The properties are Chart1.Axes.Bottom.Minimum, Chart1.Axes.Bottom.Maximum, Chart1.Axes.Left.Minimum and Chart1.Axes.Left.Maximum. For example:

Code: Select all

  Chart1.Draw;
  Caption:='Bottom min: '+FloatToStr(Chart1.Axes.Bottom.Minimum)+'  Bottom max: '+FloatToStr(Chart1.Axes.Bottom.Maximum)+
           ' Left min: '+FloatToStr(Chart1.Axes.Left.Minimum)+' Left max: '+FloatToStr(Chart1.Axes.Left.Maximum);

Re: Axis value from chart

Posted: Wed Feb 03, 2010 9:38 am
by 9047441
Thank you Yeray, that was exactly what I needed.
asgo