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')

ChartInst.GetExternalData(CfxFASDisArray.InterfacePtr,0);

error = Floating point division by zero.

Can I not add two arrays with all zero values?

Any help would be grateful.

Thanks,

Stacy

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.

--

FP

Software FX

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...