2 graph in 1 PtTrend

how can I trace 2 graph in one trend ?

because I obtian etrange things …

thanks !

u trace 2 graph same way as 1 graph, just add trend (Pt_ARG_TREND_COUNT) and pass in data …

qnx.com/developers/docs/mome … REND_COUNT

it’s more difficult …
i have 2 graphs with some colours between
!!!

have you an example ?

Im sorry but on the link i posted there is also example how to set-up colors, please read the documentation again.

qnx.com/developers/docs/mome … trend.html

I have a try ,but has some problems ,and I don’t know the reason . who can help me ! Thanks a Lot !

int trend_color_array[2]={Pg_GREEN,Pg_RED}; // line 1
PtTrendAttr_t one_attr;
PtTrendAttr_t several_attr[2];
several_attr[0].map=1; //line 4
several_attr[1].map=2;
PtArg_t args; //line 6
/* Set up the color list. */
PtSetArg(&args,Pt_ARG_TREND_COLOR_LIST,trend_color_array,2); //line 7
PtSetResources (widget, 1, args);

I have added the header file below :
#include <photon/PtTrend.h>
#include <photon/Pg.h>

compiler error:
line 1: parse error before ’ int’ // (other codes are all right,I have a test! )
line 4 :several_attr' undeclared (first use in this function) line 6: parse error before args’
line 7: args' undeclared (first use in this function) trend_color_array’ undeclared (first use in this function)

huh? If you get error on line 1 that means you have not really included any of the header? Or you made up the line number yourself?

I have solved it ,thanks everyone

the header file shouldn’t be<Pt.h>?