Page 1 of 1
Center an axis at 0
Posted: Thu Oct 14, 2004 7:13 pm
by 9081982
I have a data set that goes above and below the Y axis. One data set has the value 5 and the value -500. Another data set that I have has a value of 1100 and a value -90. What I would like to do is center 0 on the Y axis so that you can get a visible indicator of how high above or below you are.
I don't necessarily have to see the whole graph on the display, but I need the scale above and below to be the same.
Any help would be greatly appreciated.
Posted: Mon Oct 18, 2004 9:19 am
by Chris
Hi -
I have a data set that goes above and below the Y axis. One data set has the value 5 and the value -500. Another data set that I have has a value of 1100 and a value -90. What I would like to do is center 0 on the Y axis so that you can get a visible indicator of how high above or below you are.
I don't necessarily have to see the whole graph on the display, but I need the scale above and below to be the same.
Any help would be greatly appreciated.
You could try the IAxis.SetMinMax method, e.g.
Code: Select all
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scPoint
.Series(0).Add 5, "", clTeeColor
.Series(0).Add -500, "", clTeeColor
.AddSeries scPoint
.Series(1).Add 1100, "", clTeeColor
.Series(1).Add -90, "", clTeeColor
.Axis.Left.SetMinMax -2000, 2000
End With
End Sub