Custom axis problem
Posted: Thu Jul 13, 2006 6:20 am
Hi,
There are two series in the chart and I would like to use two horizontal custom axis to seperate them. Here is what I did:
m_chart2.GetAxis().GetCustom(0).SetStartPosition(0);
m_chart2.GetAxis().GetCustom(0).SetEndPosition(50);
m_chart2.GetAxis().GetCustom(0).GetAxisPen().SetColor(RGB(255,0,0));
m_chart2.Series(0).SetHorizontalAxisCustom(0);
m_chart2.Series(0).SetVerticalAxis(aLeftAxis);
m_chart2.GetAxis().AddCustom(TRUE);
m_chart2.GetAxis().GetCustom(1).SetStartPosition(50);
m_chart2.GetAxis().GetCustom(1).SetEndPosition(100);
m_chart2.GetAxis().GetCustom(1).GetAxisPen().SetColor(RGB(0,0,255));
m_chart2.Series(1).SetHorizontalAxisCustom(1);
m_chart2.Series(1).SetVerticalAxis(aRightAxis);
The two axis can display correctly, but the problem is that the custom x-axis values are missing because there is no enough space. Then I tried
m_chart2.GetPanel().SetMarginBottom(15);
Then the values can be displayed, but the space for the series is smaller, which is not desirable. Since there is no such problem for the normal bottom axis, is there any way fix it?
Thank you very much!
David
There are two series in the chart and I would like to use two horizontal custom axis to seperate them. Here is what I did:
m_chart2.GetAxis().GetCustom(0).SetStartPosition(0);
m_chart2.GetAxis().GetCustom(0).SetEndPosition(50);
m_chart2.GetAxis().GetCustom(0).GetAxisPen().SetColor(RGB(255,0,0));
m_chart2.Series(0).SetHorizontalAxisCustom(0);
m_chart2.Series(0).SetVerticalAxis(aLeftAxis);
m_chart2.GetAxis().AddCustom(TRUE);
m_chart2.GetAxis().GetCustom(1).SetStartPosition(50);
m_chart2.GetAxis().GetCustom(1).SetEndPosition(100);
m_chart2.GetAxis().GetCustom(1).GetAxisPen().SetColor(RGB(0,0,255));
m_chart2.Series(1).SetHorizontalAxisCustom(1);
m_chart2.Series(1).SetVerticalAxis(aRightAxis);
The two axis can display correctly, but the problem is that the custom x-axis values are missing because there is no enough space. Then I tried
m_chart2.GetPanel().SetMarginBottom(15);
Then the values can be displayed, but the space for the series is smaller, which is not desirable. Since there is no such problem for the normal bottom axis, is there any way fix it?
Thank you very much!
David