Axis value from chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
asgo
Newbie
Newbie
Posts: 2
Joined: Thu May 31, 2007 12:00 am

Axis value from chart

Post by asgo » Tue Feb 02, 2010 6:32 pm

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?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Axis value from chart

Post by Yeray » Wed Feb 03, 2010 9:18 am

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);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

asgo
Newbie
Newbie
Posts: 2
Joined: Thu May 31, 2007 12:00 am

Re: Axis value from chart

Post by asgo » Wed Feb 03, 2010 9:38 am

Thank you Yeray, that was exactly what I needed.
asgo

Post Reply