Page 1 of 1

Newbie question concerning TChartAxis

Posted: Tue Sep 13, 2005 12:13 pm
by 9339256
Hi,

I would like to create AChart that has one TLineSeries and a TBarSeries as well, the left axis should display for example count and the right axis percent, that is two different scales. Is this possible to do? If not I could standardize the two series, so they are shown relative the axis length, but as it is now I cant even get the left axis to show any scale or label. I would be grateful for any ideas how to make this work.

/Ingman

Problem solved, but new problem with labels position

Posted: Wed Sep 14, 2005 8:29 am
by 9339256
Hi again,

solved that problem using the following modified helpfile example:

procedure TForm1.Button1Click(Sender: TObject);
var
tmpVertAxis: TChartAxis;
begin
// Add vertical Axis
Chart1.CustomAxes.Add;
tmpVertAxis:=Chart1.CustomAxes[0];
tmpVertAxis.PositionPercent:=100;
Series2.CustomVertAxis:=tmpVertAxis;
end;

And this works fine, except that the labels on my new custom vertical axis is printed to the left of the axis which has the effect that they are in the chart area, does anyone know how to make the labels appear on the right side of the axis?

/Ingman

Posted: Wed Sep 14, 2005 9:01 am
by narcis
Hi Ingman,
And this works fine, except that the labels on my new custom vertical axis is printed to the left of the axis which has the effect that they are in the chart area, does anyone know how to make the labels appear on the right side of the axis?
Yes, you could use:

Code: Select all

tmpVertAxis.OtherSide:=true;
instead of using PositionPercent.

Posted: Wed Sep 14, 2005 9:32 am
by 9339256
That worked, excelllent :D