User (Legacy) Posted March 31, 2005 Report Share Posted March 31, 2005 The error occurs on CfxFASDisArray : CfxDataArray; ChartInst : TChartFXCS; ChartFXCS4.GetExternalData(CfxFundArray.InterfacePtr,0); How can I check the max and min of the values if the values are not known to the ChartFXCS4 until after the GetExternalData call which cause the error? If I set the max scale to 100 before the GetExternalDate call does the call then reset the max to the max in the arrays? I entered this code but the error still occurs: (the conditions for the if statements are never true) 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; ChartInst.GetExternalData(CfxFASDisArray.InterfacePtr,0); Thanks for you help, Stacy "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:<5c$2wXmMFHA.1660@webserver3.softwarefx.com>... > 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 Quote Link to comment Share on other sites More sharing options...
Software FX Posted April 3, 2005 Report Share Posted April 3, 2005 You must have this code: 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; AFTER you read the data, not before, the values of Min and Max are overridden by GetExternalData so these lines before GetExternal data have no effect whatsoever. -- FP Software FX Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.