Jump to content
Software FX Community

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

User (Legacy)

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 comment
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 comment
Share on other sites


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

  • Create New...