Axis and Margin

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

Axis and Margin

Post by seanmurphy » Tue Nov 22, 2005 3:50 pm

I have several charts stacked vertically, each has a single Tlineseries and covers the same x-range calues. The y-values of each chart are different. When the y ranges between charts differ the actual x=0 axis of the charts do not line up with each other, but I need them to line up. ie.

if both charts chart1 and chart2 ymin/ymax are 20 to 40 they line up.
if chart2 now becomes -20 to +40 then the x=0 axis for the chart moves a few pixels to the right, ie. the area of screen required for the y values now needs an extra few ixels to accomodate the - sign.

I can kludge this by altering the marginleft for each chart, but it would be cleaner if there was some property which allows a fixed number of pixels for the y-axis value labels.

Any pointers much appreciated.
thanks,
Sean

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Nov 22, 2005 5:23 pm

Hi Sean,

Yes, you can do that using LabelsSize:

Code: Select all

  Chart1.LeftAxis.LabelsSize:=30;
  Chart2.LeftAxis.LabelsSize:=30;
  Chart3.LeftAxis.LabelsSize:=30;
  Chart4.LeftAxis.LabelsSize:=30;
Best Regards,
Narcís Calvet / 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

seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

Post by seanmurphy » Tue Nov 22, 2005 8:34 pm

thanks Narcis,

I should have found that one, sorry.
Sean

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Nov 23, 2005 9:48 am

No problem Sean. I'm glad to hear this solved your problems.
Best Regards,
Narcís Calvet / 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

Post Reply