Here is something I have very little idea about, TA-Chart, scaling.
When I try calling my drawing method for the first time, I get an ugly error message, see below.
The second call works fine. So the problem with the first call shall be "empty values".
Sure, my problem, but TAChart shall work for dummies as well.
This is the error message:
[Window Title]
Fehler
[Content]
Projekt project1 hat Exception-Klasse »External: FLT OVERFLOW« ausgelöst.
In Datei 'tatransformations.pas' in Zeile 751
[Ok]
It jumps to
unit TATransformations;
procedure TAutoScaleAxisTransform.UpdateBounds(var AMin, AMax: Double);
begin
// Auto-scale is only defined for finite bounds.
if IsInfinite(AMin) or IsInfinite(AMax) then exit;
with TAutoScaleTransformData(FDrawData) do begin
UpdateMinMax(AMin, FMin, FMax);
UpdateMinMax(AMax, FMin, FMax);
if FMax = FMin then
FScale := 1.0
else
FScale := (MaxValue - MinValue) / (FMax - FMin);
FOffset := MinValue - FMin * FScale;
end;
AMin := MinValue;
AMax := MaxValue;
end;
My idea:
Should there be some more lines making sure, there will not be "problem"-values?
One line, making sure, we do not divide by zero?
If somebody thinks "yes", I would be grateful, if he could post the lines here.
So I can parse them directly without re-installing new versions of anything.
And one suggestion more:
Write the date and version of the unit into the top-lines-comments. As it is not there, I am not sure, which version I use.