Jump to content
Software FX Community

Error: "Floating Point divison by zero" when adding arrays with all zero values

Recommended Posts

I am recieving an error adding the following values to a chart:

CfxFASDisArray := CfxDataArray.Create();

CfxFASDisArray.AddArray(Array1); // Array1 = (0, 0, 0, 0)

CfxFASDisArray.AddArray(Array2); // Array2 = (0, 0, 0, 0)

CfxFASDisArray.AddArray(ItemArray); // ItemArray = ('Contribs', 'Max

Contribs', 'Min Contribs', 'Sum Reqd Qtrlies')


error = Floating point division by zero.

Can I not add two arrays with all zero values?

Any help would be grateful.



Link to post
Share on other sites

Yes you can but you have to give Chart FX a scale (Min and Max), otherwise 

you end up with no scale (from 0 to 0). After setting your data you can do:

if (chart.Min = chart.Max) Then

chart.Max := 100; // Or any arbitrary value you want to display when

this condition happens.



Software FX

Link to post
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.

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.

  • Create New...