User (Legacy) Posted August 26, 2005 Report Share Posted August 26, 2005 Hello, I am trying to clean up a few floating point exceptions that show up when running a few graphs. One that I have managed to track down seems to happen anytime I add a point to the graph using CHART_HIDDEN constant. Here is an example of what I made using the ActiveX control (Cfx4032.ocx version 5.0.14.5) in VC++... ... OnInitDialog() { CDialog::OnInitDialog(); m_pChartFX->OpenDataEx(COD_VALUES, 1, 2); m_pChartFX->OpenDataEx(COD_XVALUES, 1,2); m_pChartFX->ValueEx[0][0] = -7.765109; // this number can be anything m_pChartFX->XValueEx[0][0] = -11.36509; // this number can be anything m_pChartFX->ValueEx[0][1] = CHART_HIDDEN; m_pChartFX->XValueEx[0][1] = CHART_HIDDEN; m_pChartFX->CloseData(COD_VALUES); m_pChartFX->CloseData(COD_XVALUES); return TRUE; } This seems very simple to me and something that I think people do all the time, but it does throw a floating point exception in my test app as well as in our target app. Please help! Thanks in advance, Diana Link to comment Share on other sites More sharing options...
Software FX Posted August 27, 2005 Report Share Posted August 27, 2005 Never assign CHART_HIDDEN to XValue like in: m_pChartFX->XValueEx[0][1] = CHART_HIDDEN; Simply assign ZERO or leave it untouched and set CHART_HIDDEN to the corresponding X-Value: m_pChartFX->ValueEx[0][1] = CHART_HIDDEN; m_pChartFX->XValueEx[0][1] = 0; Chart FX 5 is not prepared for CHART_HIDDEN to be passed anywhere but as a Y-Value. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.