Jump to content
Software FX Community

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

User (Legacy)

Recommended Posts

The only problem with checking the min and max values after passing the data

is that the error is occurring on the call to pass the data.

I have tried to set the values this way:

ChartInst : TChartFXCS;

CfxFASDisArray : CfxDataArray;

Array1, Array2 : Array of Double;

ItemArray : Array of String;

CfxFASDisArray.AddArray(Array1); // Values : (0, 0, 0, 0)

CfxFASDisArray.AddArray(Array2); // Values : (0, 0, 0, 0)

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

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

ChartInst.Axis[AXIS_X].LabelAngle := 90;

ChartInst.Axis[AXIS_X].Font.Name := 'Arial';

ChartInst.Axis[AXIS_X].Font.Size := 8;

ChartInst.Axis[AXIS_Y].Format := '###,###,###,###'; //AF_NUMBER;


// Error Floating Point division by zero

if (ChartInst.Axis[AXIS_Y].Min = ChartInst.Axis[AXIS_Y].Max) then

ChartInst.Axis[AXIS_Y].Max := 100;

if (ChartInst.Axis[AXIS_X].Min = ChartInst.Axis[AXIS_X].Max) then

ChartInst.Axis[AXIS_X].Max := 10;

Thanks for all your help,


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.

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