ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How to plot real-time charts over defined patterns?
Posted by cho on Sep-20-2022 09:56
Attachments:
Hello Peter,

The defined pattern is already displayed in the background of the chart area before the real-time chart starts.
I want the real-time chart to draw a defined pattern over the background.

I was wondering if you could help me with a question?
I would like to implement this with MFC.

Best Regards
Cho
Image 1.jpg

  Re: How to plot real-time charts over defined patterns?
Posted by Peter Kwan on Sep-20-2022 18:06
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

  Re: How to plot real-time charts over defined patterns?
Posted by cho on Sep-22-2022 14:59
Hi Peter,


Thank you for your kind help.


Regards
Cho