Jump to content
Software FX Community

Floating Point Exception when using CHART_HIDDEN points


User (Legacy)
 Share

Recommended Posts

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

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

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...