mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 07:36:14 +02:00
TAChart: Use Intervals.MinLength in TCustomChartSource
git-svn-id: trunk@31873 -
This commit is contained in:
parent
8b1fb0e09d
commit
bfd5cb4f0e
@ -595,17 +595,23 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
i, li: Integer;
|
i, li, vi, pvi: Integer;
|
||||||
pv, v: Double;
|
pv, v: Double;
|
||||||
begin
|
begin
|
||||||
cnt := Length(AValues);
|
cnt := Length(AValues);
|
||||||
SetLength(AValues, cnt + Count + 2);
|
SetLength(AValues, cnt + Count + 2);
|
||||||
v := 0;
|
v := 0;
|
||||||
li := 0;
|
li := 0;
|
||||||
|
pvi := MaxInt;
|
||||||
for i := 0 to Count - 1 do begin
|
for i := 0 to Count - 1 do begin
|
||||||
pv := v;
|
pv := v;
|
||||||
v := IfThen(AParams.FUseY, Item[i]^.Y, Item[i]^.X);
|
v := IfThen(AParams.FUseY, Item[i]^.Y, Item[i]^.X);
|
||||||
if not InRange(v, AParams.FMin, AParams.FMax) then continue;
|
if not InRange(v, AParams.FMin, AParams.FMax) then continue;
|
||||||
|
if aipUseMinLength in AParams.FIntervals.Options then begin
|
||||||
|
vi := AParams.ToImage(v);
|
||||||
|
if Abs(vi - pvi) < AParams.FIntervals.MinLength then continue;
|
||||||
|
pvi := vi;
|
||||||
|
end;
|
||||||
if (cnt = 0) and (i > 0) then
|
if (cnt = 0) and (i > 0) then
|
||||||
Push(pv, i - 1);
|
Push(pv, i - 1);
|
||||||
Push(v, i);
|
Push(v, i);
|
||||||
|
Loading…
Reference in New Issue
Block a user