Chart Axis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Roy
Newbie
Newbie
Posts: 64
Joined: Wed Feb 25, 2009 12:00 am
Location: Dallas, Texas
Contact:

Chart Axis

Post by Roy » Wed Mar 02, 2011 4:45 pm

Is there a way to swap axis, would like to allow the user to swap Left and Bottom Axis (data and labels)?

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

Re: Chart Axis

Post by Yeray » Wed Mar 02, 2011 5:11 pm

Hi Roy,

You can set a series to use left or right axis as follows:

Code: Select all

  Series1.VertAxis:=aRightAxis;
  Series2.VertAxis:=aLeftAxis;
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

Roy
Newbie
Newbie
Posts: 64
Joined: Wed Feb 25, 2009 12:00 am
Location: Dallas, Texas
Contact:

Re: Chart Axis

Post by Roy » Wed Mar 02, 2011 5:37 pm

Thanks. Will this also change the axis minimum, maximum, increment, etc.?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Chart Axis

Post by Sandra » Thu Mar 03, 2011 12:41 pm

Hello Roy,

To change the properties of axes minimum,maximum,increment you need do something as next:

Code: Select all

Chart1.Axes.Left.Automatic:=False;
Chart1.Axes.Left.Maximum:=1000;
Chart1.Axes.Left.Minimum:=0;
Chart1.Axes.Left.Increment:=100;

Chart1.Axes.Right.Automatic:=False;
Chart1.Axes.Right.Maximum:=1000;
Chart1.Axes.Right.Minimum:=0;
Chart1.Axes.Right.Increment:=50;
I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

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

Re: Chart Axis

Post by Yeray » Thu Mar 03, 2011 12:54 pm

Hi Roy,

Just in addition to what Sandra just said:
If you don't change the axes range with SetMinMax method, nor the automatic properties, they will automatically fit the series they have assigned.
So, if you have a series using the left axis and another series using the right axis and you swap them, their ranges will also be reset to fit their new series assignment.
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

Post Reply