TAChart: Fix TFuncSeries hanging in case of inverted x axis

git-svn-id: trunk@48531 -
This commit is contained in:
wp 2015-03-29 21:12:26 +00:00
parent 723c7b59ac
commit 3459fff08c

View File

@ -171,7 +171,7 @@ procedure TDrawFuncHelper.ForEachPoint(
AXg, AXMax: Double; AOnMoveTo, AOnLineTo: TOnPoint); AXg, AXMax: Double; AOnMoveTo, AOnLineTo: TOnPoint);
var var
hint: Integer; hint: Integer;
xa, xg1, xa1: Double; xa, xg1, xa1, dx: Double;
begin begin
if FGraphStep = 0 then exit; if FGraphStep = 0 then exit;
@ -183,8 +183,9 @@ begin
if AXg < AXMax then if AXg < AXMax then
AOnMoveTo(AXg, xa); AOnMoveTo(AXg, xa);
dx := abs(FGraphStep);
while AXg < AXMax do begin while AXg < AXMax do begin
xg1 := AXg + FGraphStep; xg1 := AXg + dx;
xa1 := FGraphToAxisXr(xg1); xa1 := FGraphToAxisXr(xg1);
if FDomainExclusions.Intersect(xa, xa1, hint) then begin if FDomainExclusions.Intersect(xa, xa1, hint) then begin
AOnLineTo(FAxisToGraphXr(xa), xa); AOnLineTo(FAxisToGraphXr(xa), xa);