TAChart: Fix TCubicSplineSeries drawing nothing if there are less than 4 data points and the option csoDrawFewPoints is set.

git-svn-id: trunk@57634 -
This commit is contained in:
wp 2018-04-09 17:09:00 +00:00
parent dd35516710
commit 5ce61895bf
2 changed files with 7 additions and 3 deletions

View File

@ -94,7 +94,7 @@ type
FAssignOp: String;
FCurIndent: integer;
FCurrentPos: Integer;
FDefaultDefineProperties: CodePointer;
FDefaultDefineProperties: Pointer; //CodePointer;
FExecCustomProc: string;
FExecCustomProcUnit: string;
FIgnoreChildren: Boolean;

View File

@ -1296,6 +1296,7 @@ var
r: Integer = 0;
minv, maxv: ArbFloat;
extY: TDoubleInterval = (FStart: Infinity; FEnd: NegInfinity);
extChg: Boolean = false;
s: TSpline;
begin
Result := inherited Extent;
@ -1309,9 +1310,12 @@ begin
ipfsmm(High(s.FCoeff), s.FX[0], s.FY[0], s.FCoeff[0], minv, maxv, r);
extY.FStart := Min(minv, extY.FStart);
extY.FEnd := Max(maxv, extY.FEnd);
extChg := true;
end;
if extChg then begin
Result.a.Y := extY.FStart;
Result.b.Y := extY.FEnd;
end;
Result.a.Y := extY.FStart;
Result.b.Y := extY.FEnd;
end;
procedure TCubicSplineSeries.FreeSplines;