PtTrend widget

Hi

I would like to create a time series graph using PtTrend.

After create the widget in the photon application, how can I change the data dynamically. What is the code required for this.

thanks

RL

Something like this?

int draw( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo )
{
short data[10];

data[0] = 2;
data[1] = 12;
data[2] = 32;
data[3] = 72;
data[4] = 12;
data[5] = 2;
data[6] = 12;
data[7] = 32;
data[8] = 72;
data[9] = 12;
/* eliminate ‘unreferenced’ warnings */
widget = widget, apinfo = apinfo, cbinfo = cbinfo;

printf(“Running…\n”);

PtSetResource(widget,Pt_ARG_TREND_MIN,0,0);
PtSetResource(widget,Pt_ARG_TREND_MAX,100,0);
PtSetResource(widget,Pt_ARG_TREND_INC,10,0);
PtTrendChangeData(widget,(short const *) &data,0,10);

return( Pt_CONTINUE );

}

Dear Mr.Thegman

Thank you verymuch.

bye