TAChart: fix rare arithmetic overflow in logarithmic axis labeling

git-svn-id: trunk@44860 -
This commit is contained in:
wp 2014-04-30 19:00:50 +00:00
parent 0ad8e4e70f
commit a3cf4354b2
2 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,7 @@ type
FUseY: Boolean;
function CountToStep(ACount: Integer): Double; inline;
function IsAcceptableStep(AStep: Integer): Boolean; inline;
function IsAcceptableStep(AStep: Int64): Boolean; inline;
procedure RoundToImage(var AValue: Double);
function ToImage(AX: Double): Integer; inline;
end;
@ -248,7 +248,7 @@ begin
Result := Power(10, Floor(Log10((FMax - FMin) / ACount)));
end;
function TValuesInRangeParams.IsAcceptableStep(AStep: Integer): Boolean;
function TValuesInRangeParams.IsAcceptableStep(AStep: Int64): Boolean;
begin
with FIntervals do
Result := not (

View File

@ -207,7 +207,7 @@ procedure TIntervalChartSource.CalculateIntervals(
procedure TryStep(AStep: Double; var ABestCount: Integer);
var
m, start: Double;
mi, prev, cnt: Integer;
mi, prev, cnt: Int64;
begin
if AStep <= 0 then exit;
start := Int(AParams.FMin / AStep) * AStep;