Page 1 of 1

Axis and Margin

Posted: Tue Nov 22, 2005 3:50 pm
by 9231397
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

Posted: Tue Nov 22, 2005 5:23 pm
by narcis
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;

Posted: Tue Nov 22, 2005 8:34 pm
by 9231397
thanks Narcis,

I should have found that one, sorry.
Sean

Posted: Wed Nov 23, 2005 9:48 am
by narcis
No problem Sean. I'm glad to hear this solved your problems.