I use the new DataPointMarksClickTool and encounter a bug which I cannot prevent. So I am looking for a method to prevent the Invalid floating point operation:
* take the attached example (this is a bit bigger because on a new project I get another error)
* run the program in debug mode and Ctrl-left-click into the chart on a position where no data is
result: FLT INVALID OPERATION in this line of TACustomSeries.pas:
centerLvl := AxisToGraphY((ext.a.y + ext.b.y) * 0.5);
Lazarus 2.3.0 (rev main-2_3-2941-g84f716a2ff)
FPC 3.2.2
x86_64-win64-win32/win64
The error is triggered because the extent is infinite. The error only occurs when one clicks at a position without data in the chart. However, I cannot find a method to check this before the error is triggered.
I can of course modify TACustomSeries.pas but on the next FPCupDeluxe update this will be overwritten.