TTMSFNCChartEditorDialog fails when a point has Undefined=True

Hi.
Invoking the chart editor dialog raises a runtime error, floating point overflow, when any of the points has Undefined = True.

image

Tested in a VCL application. Forcing Undefined = False avoids the error, but I'm using dynamic charts based on user's runtime filters, so, there are some chart values that aren't available on every query, and then I must set Undefined := True.

Could you supress this error and let the dialog open? I must let the users customize some chart elements.
Thanks.

Please provide a sample to allow us to reproduce this here, so far we are not able to reproduce this.

fncchart problems.zip (8.4 KB)

Please play with the checkbox to make Series[1].Points[0].Undefined = True, the checkbox to enable/disable the second data point & show/hide YAxis.

If YAxis is visible, setting Undefined may cause several runtime point overflow errors.
If there's no second data point, and the first one is disable, you cannot invoke the editor.

This sample also shows the problem I had trying to centerthe bar series with just one point, at the other topic TMSFNCChart - How to center a bar when the series has only 1 point?

Now I noticed you've answered something there. I'll test it.

We have tested your sample application but couldn't reproduce this here. We tested this in Delphi 12. Did you change default compiler settings in your environment?

No.
It has FNC Chart 2.6.1.1 installed. (When I drop an FNC Chart on the form, Version property shows 2.6.0.2)

At home, with FNC Chart 2.6.1.2, same problem.
Both Delphi 11.

fncchartproblem.zip (1.8 MB)

Video :point_up_2:

Another doubt about "Undefined" :point_down:
fncchartproblem 02.zip (770.3 KB)

OK, it was not clear until I saw the video that the floating point error was during interaction with the chart, and not the editor. However, I retested this here multiple times and couldn't reproduce the error. I would ask you if you can debug the issue, and see where the floating point error occurs during interaction?

You mean setting Undefined works completely fine there?

When both Series1 points are visible, and then you set 1st point Undefined := True, the first red circle (50) becomes invisible and the second value (61) remains in the same place? Aligned with the second XValue ?

I opened the demo, performed the same actions you did, but did not get invalid floating point error. But if you get the floating point error, then perhaps it's good to know exactly which function throws the error, so we can apply a patch and see if that fixes the issue. Presumably that will be the fastest way to a solution as so far, we are not able to reproduce this here on our end.

VCL.TMSFNCChart line 4400

image

image

image

And this does work there?

I insist on this because I also have this behavior in design-time. With this same chart, when I navigate to open the second series (Series1), it's First point, and check it's Undefined property , the second point (value=61) moves completely to the left, half cut. The same runtime situation.

We have tested this here in 11.2 and are able to reproduce the issue. In 12 we are not able to reproduce the issue. First I thought it was IDE related, but apparently different IDEs produce different results. We have applied a fix.