Jump to content
Software FX Community

add new series in XY charts


User (Legacy)
 Share

Recommended Posts

Hi,

I need to add new series in XY chart dynamically. Each series may have

different numbers of data. For example, series 1 has 100 points with range

from 1 to 100, series 2 has 1000 points with range from 500 to 1000. And I

have to load the data of next series after all previous series were

displayed. All series of data should go in the same chart.

I loaded the data of series 1 using the code as follows:

m_pChartFX->OpenDataEx(COD_VALUES,1,100);

m_pChartFX->OpenDataEx(COD_XVALUES,1,100);

m_pChartFX->Series->Item[0]->Yvalue[0] = 1;

m_pChartFX->Series->Item[0]->Yvalue[1] = 45;

m_pChartFX->Series->Item[0]->Yvalue[2] = 60;

.....

m_pChartFX->Series->Item[0]->Xvalue[0] = 10;

m_pChartFX->Series->Item[0]->Xvalue[1] = 21;

m_pChartFX->Series->Item[0]->Xvalue[2] = 32;

....

m_pChartFX->CloseData((CfxCod) (COD_XVALUES|COD_SMOOTH));

m_pChartFX->CloseData(COD_VALUES);

It works fine. But when I tried to load the XY pair of data of series 2 in

m_pChartFX->Series->Item[1], I got the abnormal program termination error.

Is any propery I should set to load the unknow number of series? Or what

should I do before I can load the second series of data?

Thanks,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...