64,648
社区成员
发帖
与我相关
我的任务
分享
char second[32] ="";
char one[7]="";
struct tm *temptm;
time_t temptime;
temptime= time(0);
temptm = localtime(&temptime);
sprintf(second,"%02d:%02d:%02d",temptm->tm_hour,temptm->tm_min,temptm->tm_sec);
while(m_Chart1.Series(0).GetCount()>50) m_Chart1.Series(0).Delete(0);
if(m_Chart1.Series(0).GetCount()>50) m_Chart1.Series(0).Delete(0);
newX=m_Chart1.Series(0).GetXValues().GetCount()+1;//
newY=GetRandom(100,300);
m_Chart1.Series(0).AddXY(newX,newY,second,RGB(255,255,0));
char second[32] ="";
char one[7]="";
struct tm *temptm;
time_t temptime;
temptime= time(0);
temptm = localtime(&temptime);
sprintf(second,"%02d:%02d:%02d",temptm->tm_hour,temptm->tm_min,temptm->tm_sec);
sprintf(one,"%02d%02d%02d",temptm->tm_hour,temptm->tm_min,temptm->tm_sec);
while(m_Chart1.Series(0).GetCount()>50)m_Chart1.Series(0).Delete(0);
if(m_Chart1.Series(0).GetCount()>50)
{
m_Chart1.Series(0).Delete(0);
m_Chart1.GetAxis().GetBottom().SetAutomatic(TRUE);
}
if(m_Chart1.Series(0).GetXValues().GetCount()<1)
{
newX=m_Chart1.Series(0).GetXValues().GetCount()+1;//
}
else newX=m_Chart1.Series(0).GetXValues().GetLast()+1;
newY=GetRandom(100,300);
m_Chart1.Series(0).AddXY(newX,newY,second,RGB(255,255,0));