Jump to content
Software FX Community

Problem with COD_UNCHANGE for number of points


User (Legacy)

Recommended Posts

I'm using ChartFX Client Server with all the latest service packs and

programing in Visual C++. I have come across a problem when I add points to

different series in an XY plot chart.

I have two series with an unknown number of points. So I open the data with

the following line of code.~

m_pGraphDlg->m_ctrlCFX.OpenDataEx(COD_VALUES|COD_ALLOCHIDDEN,

COD_UNCHANGE,COD_UNKNOWN);

m_pGraphDlg->m_ctrlCFX.OpenDataEx(COD_XVALUES|COD_ALLOCHIDDEN,

COD_UNCHANGE,COD_UNKNOWN);

And then I start adding my points. Closing the graph with the respective

CloseDatas. The problem is when I add another series that has less points

than the previous one. After adding the points, the graph simply CHOPS of

any points I had MORE than the series I just had. The same thing happens

when I add a series that has MORE points than the previous, but in that

case, it ADDS points to the other series and sets them to 0.

The workaround I found for this is supplying a number of points instead of

COD_UNKNOWN, but this is not what I want because I am never sure about the

points I am going to have in my graph.

Can someone please tell me if I'm doing anything wrong.

Thanks

Paulo

Link to comment
Share on other sites

All series have the same number of points. You can not have a series that is

shorter.

You can fill some of the series with hidden values at the end to simulate a

different number of points per series.

COD_UNKNOWN is not to be used with a chart that already has data in it as it

will use the last value set before CloseData to determine the size of your

data (this is why the data is being chopped off).

You can just use 0 instead of COD_UNKNOWN, this will leave the same number

of points but the data size will increase if you set a value beyond the

current range.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...