Page 1 of 1
Chart Axis
Posted: Wed Mar 02, 2011 4:45 pm
by 10052635
Is there a way to swap axis, would like to allow the user to swap Left and Bottom Axis (data and labels)?
Re: Chart Axis
Posted: Wed Mar 02, 2011 5:11 pm
by yeray
Hi Roy,
You can set a series to use left or right axis as follows:
Code: Select all
Series1.VertAxis:=aRightAxis;
Series2.VertAxis:=aLeftAxis;
Re: Chart Axis
Posted: Wed Mar 02, 2011 5:37 pm
by 10052635
Thanks. Will this also change the axis minimum, maximum, increment, etc.?
Re: Chart Axis
Posted: Thu Mar 03, 2011 12:41 pm
by 10050769
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,
Re: Chart Axis
Posted: Thu Mar 03, 2011 12:54 pm
by yeray
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.