I am completely new to TeeChart and am attempting to add a vertical line using Chart::DrawLine() in a Visual C++ application compiled under Visual Studio 2008. Sample code appears below.
The series that I've added to the chart plots just fine, but I can't get the lines to appear at all. Breakpoints show my OnAfterDraw() routine is getting called. Any thoughts?
Thanks for your help...
- Ted
Code: Select all
private: System::Void MyChart_OnAfterDraw(System::Object^ sender, System::EventArgs^ e)
{
int middle = (chart->Axis->Bottom->StartPosition + chart->Axis->Bottom->EndPosition) / 2;
chart->Canvas->DrawLine(middle, chart->Axis->Left->StartPosition, middle, chart->Axis->Left->EndPosition);
chart->Canvas->DrawLine(10, 22, 16, 45);
}