Series Error at runtime?
Posted: Thu May 13, 2010 10:50 pm
Hello All,
We've been using TeeChart for many years. But I can't figure out what I am doing wrong in this code (BDS C++ Builder 2010, TeeChart 8.06). Can anyone tell me what is wrong? The vectors get added fine. But in the loop it throws an exception when trying to set "Custom" to true for the first item.
DcmChart->Draw();
DcmSeries->Clear();
DcmSeries->AddVector( 1, 1, 1, 2, 1, 1, "Nose", clBlue );
DcmSeries->AddVector( 1, 1, 1, 1, 2, 1, "Wing", clBlue );
DcmSeries->AddVector( 1, 1, 1, 1, 1, 2, "Down", clBlue );
for ( unsigned int i=0; i<3; ++i )
{
DcmSeries->Marks->Positions->Position->Custom = true;
DcmSeries->Marks->Positions->Position->LeftTop.x = DcmSeries->CalcXPosValue( DcmSeries->EndXValues->Value );
DcmSeries->Marks->Positions->Position->LeftTop.y = DcmSeries->CalcXPosValue( DcmSeries->EndYValues->Value );
}
We've been using TeeChart for many years. But I can't figure out what I am doing wrong in this code (BDS C++ Builder 2010, TeeChart 8.06). Can anyone tell me what is wrong? The vectors get added fine. But in the loop it throws an exception when trying to set "Custom" to true for the first item.
DcmChart->Draw();
DcmSeries->Clear();
DcmSeries->AddVector( 1, 1, 1, 2, 1, 1, "Nose", clBlue );
DcmSeries->AddVector( 1, 1, 1, 1, 2, 1, "Wing", clBlue );
DcmSeries->AddVector( 1, 1, 1, 1, 1, 2, "Down", clBlue );
for ( unsigned int i=0; i<3; ++i )
{
DcmSeries->Marks->Positions->Position->Custom = true;
DcmSeries->Marks->Positions->Position->LeftTop.x = DcmSeries->CalcXPosValue( DcmSeries->EndXValues->Value );
DcmSeries->Marks->Positions->Position->LeftTop.y = DcmSeries->CalcXPosValue( DcmSeries->EndYValues->Value );
}