We want to create a vertical line with dashed style. We used the code below to draw the line. The line is not being displayed on the Chart until we don't manually refresh the dialog box. We included the below logic inside OnAfterDrawTchart event. Please provide your input. Source code:
long lDrawLineTool = m_reschedChart.GetTools().Add(tcDrawLine);
CDrawLineTool cDrawLineTool = Chart.GetTools().GetItems(lDrawLineTool).GetAsDrawLine();
cDrawLineTool.AddLine(5, 0, 5, 10);
cDrawLineTool.GetPen().SetStyle(psDash);
Thanks.
After initializing the chart you'll probably have to call InternalRepaint method. For example:
m_reschedChart.GetEnvironment().InternalRepaint();
so that OnAfterDraw event is fired.