|
DataPoint()함수 사용후에
Update()함수를 호출해야만 그래프에 표시됩니다.
1초짜리 타이머에 Update()함수를 넣으세요...
그럼 1초마다 이동하면서 그래프를 그려줍니다.
이동 간격은 SetpSize를 설정하면 되구욥...(오프젝트 인스팩터에서 설정 가능)
[간단한 예]
void __fastcall TForm1::FormShow(TObject *Sender)
{
PerformanceGraph1->StepSize = 5;
PerformanceGraph1->GridSize = PerformanceGraph1->StepSize*5;
PerformanceGraph1->Scale = PerformanceGraph1->Gradient;
PerformanceGraph1->Kind = pgLine;
}
//---------------------------------------------------------------------------
// 1초 타이머
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
PerformanceGraph1->DataPoint(clGreen, random(200));
PerformanceGraph1->Update();
}
|