I am now trying with Teechart ActiveX Pro 8 version and seems that the older problems are resolved.
But now when i am using the code to drawline which was perfectly drawing lines in version 7 seems to have some problem in version 8.
I am using following code
Code: Select all
CPen1 penMass1 = m_canvas[nChartIndx].GetPen();
penMass1.SetColor(PEN_COLOR_RED);
penMass1.SetStyle(psSolid);
Y0 = m_graph[nChartIndx].GetAxis().GetTop().GetPosition();
Y1 = m_graph[nChartIndx].GetAxis().GetBottom().GetPosition();
m_canvas[nChartIndx].DrawLine(X0, Y0, X1, Y1);
// drawing line intersecting Y axis
penMass1.SetColor(PEN_COLOR_BLACK);
penMass1.SetStyle(psDash);
long YMid = (Y1 + Y0) / 2;
X0 = m_axisLeft[nChartIndx].GetPosition();
X1 = m_axisRight[nChartIndx].GetPosition();
X1 = m_graph[nChartIndx].GetAxis().GetRight().GetIStartPos();
m_canvas[nChartIndx].DrawLine(X0, YMid, X1, YMid);
it is not drawing the horizontal line properly,. Would you please help me??
Thanks in advance.