Another way to have vertical axis at specific x position (in your case 0.0) is to use the following code:
Code: Select all
...
horizBar1.Add(-5);
horizBar1.Add(5);
horizBar1.Add(-2);
horizBar1.Add(-1);
horizBar1.GetVertAxis.Visible = false;
...
private void tChart2_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
// #1 : calculate x screen position for vertical axis
int xpos = horizBar1.GetHorizAxis.CalcXPosValue(0.0);
// #2 : Draw axis
horizBar1.GetVertAxis.AxisPen.Visible = true;
horizBar1.GetVertAxis.Draw(xpos - 10, xpos - 20, xpos, false);
}