Problem with adding custom axis...
Posted: Wed Jan 12, 2005 12:22 am
Hello.
I need to draw a marix plot. Matrix plot must have many axes and I use the method, AddCustom() of CAxes class. When I add just one custom axis, TChart works. But, I add two or more custom axes and then custom axis index error occurs.
The codes that I use follows:
long lYAxis;
lYAxis = m_pChart->GetAxis().AddCustom(FALSE);
m_pChart->GetAxis().GetCustom(lYAxis).SetStartPosition(1);
m_pChart->GetAxis().GetCustom(lYAxis).SetEndPosition(60);
m_pChart->GetAxis().GetCustom(lYAxis).GetTitle().SetAngle(90);
lYAxis = m_pChart->GetAxis().AddCustom(FALSE); // Not error at this time
m_pChart->GetAxis().GetCustom(lYAxis).SetStartPosition(70);
m_pChart->GetAxis().GetCustom(lYAxis).SetEndPosition(99);
m_pChart->GetAxis().GetCustom(lYAxis).GetTitle().SetAngle(90);
.......
m_pChart->GetExport().SaveToFile(szFileName); -> Custom Axis Index Error occurs.
I use TeeChart ActiveX ver 7.0
Please tell me the solution.
thanks.
I need to draw a marix plot. Matrix plot must have many axes and I use the method, AddCustom() of CAxes class. When I add just one custom axis, TChart works. But, I add two or more custom axes and then custom axis index error occurs.
The codes that I use follows:
long lYAxis;
lYAxis = m_pChart->GetAxis().AddCustom(FALSE);
m_pChart->GetAxis().GetCustom(lYAxis).SetStartPosition(1);
m_pChart->GetAxis().GetCustom(lYAxis).SetEndPosition(60);
m_pChart->GetAxis().GetCustom(lYAxis).GetTitle().SetAngle(90);
lYAxis = m_pChart->GetAxis().AddCustom(FALSE); // Not error at this time
m_pChart->GetAxis().GetCustom(lYAxis).SetStartPosition(70);
m_pChart->GetAxis().GetCustom(lYAxis).SetEndPosition(99);
m_pChart->GetAxis().GetCustom(lYAxis).GetTitle().SetAngle(90);
.......
m_pChart->GetExport().SaveToFile(szFileName); -> Custom Axis Index Error occurs.
I use TeeChart ActiveX ver 7.0
Please tell me the solution.
thanks.