Hi cho,
You can simply add a line layer to draw the defined pattern first, before drawing the realtime data. For example:
// Draw the defined layer with defined x and y coordinates
double definedX[] = { 0, 5, 5, 10, 10, 15, 15, 25, 25, 30, 30, 35 };
double definedY[] = { 0, 0, 50, 50, 100, 100, 30, 30, 90, 90, 150, 150 };
int definedSize = (int)(sizeof(definedX) / sizeof(*definedX));
LineLayer *definedLayer = c->addLineLayer(DoubleArray(definedY, definedSize), 0x0000ff, "Defined Line");
definedLayer->setXData(DoubleArray(definedX, definedSize));
.... code to draw the other realtime line layers ....
Best Regards
Peter Kwan |