Jump to content
Software FX Community

How to clear chart data?


User (Legacy)

Recommended Posts

Hi! 

I'm trying to convert an application that used ChartFX 3.0 to ChartFX 98.

Since the package is not delivered yet I'm using the trial version.

And I faced the following problem.

The below code worked with ChartFX 3.0, i.e. it cleared chart data and the

chart window displayed "No data available message". However, the code

doesn't work with ChartFX 98, i.e. the chart window contents do not change.

What am I doing wrong?

What is the correct way to remove all series and points from the chart?

Thanks,

Serge

if (nNewPoints == 0 || nNewSeries == 0)

{

// no points --> empty chart

int nSeries = m_pChartFX->NSeries;

int nPoints = m_pChartFX->NValues;

m_pChartFX->OpenDataEx((CfxCod)COD_VALUES, nSeries, nPoints);

m_pChartFX->OpenDataEx((CfxCod)COD_XVALUES, nSeries, nPoints);

m_pChartFX->CloseData(CfxCod(COD_VALUES | COD_REMOVE | COD_SMOOTH));

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

return;

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...