mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 18:13:55 +02:00
TAChart: Fix incorrect extent calculation of TOpenHighLowCloseSeries.
git-svn-id: branches/fixes_1_8@56552 -
This commit is contained in:
parent
1d2dc52d99
commit
11a3a998ae
@ -1136,9 +1136,23 @@ end;
|
||||
function TOpenHighLowCloseSeries.AddXOHLC(
|
||||
AX, AOpen, AHigh, ALow, AClose: Double;
|
||||
ALabel: String; AColor: TColor): Integer;
|
||||
var
|
||||
y: Double;
|
||||
begin
|
||||
if ListSource.YCount < 4 then ListSource.YCount := 4;
|
||||
Result := ListSource.Add(AX, NaN, ALabel, AColor);
|
||||
|
||||
if YIndexOpen = 0 then
|
||||
y := AOpen
|
||||
else if YIndexHigh = 0 then
|
||||
y := AHigh
|
||||
else if YIndexLow = 0 then
|
||||
y := ALow
|
||||
else if YIndexClose = 0 then
|
||||
y := AClose
|
||||
else
|
||||
raise Exception.Create('TOpenHighLowCloseSeries: Ordinary y value missing');
|
||||
|
||||
Result := ListSource.Add(AX, y, ALabel, AColor);
|
||||
with ListSource.Item[Result]^ do begin
|
||||
SetY(YIndexOpen, AOpen);
|
||||
SetY(YIndexHigh, AHigh);
|
||||
|
Loading…
Reference in New Issue
Block a user