Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 722 - no candle body
Summary: no candle body
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: 140220
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-14 05:54 EDT by SHIN Nara
Modified: 2015-03-11 10:49 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
candle sample (7.23 KB, application/x-zip-compressed)
2014-04-14 05:55 EDT, SHIN Nara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SHIN Nara 2014-04-14 05:54:06 EDT
Series.AddCandle(0, 0, 2, -1 ,1) should make a candle body but should not.
Comment 1 SHIN Nara 2014-04-14 05:55:07 EDT
Created attachment 172 [details]
candle sample
Comment 2 narcís calvet 2014-04-14 11:01:10 EDT
TeeChart .NET does it correctly.
Comment 3 narcís calvet 2015-03-11 10:49:08 EDT
Source code users can fix it implementing TCandleSeries.CalcItem method like this:

procedure TCandleSeries.CalcItem(ValueIndex:Integer; out AItem:TCandleItem);
begin
  with AItem do
  begin
    tmpX:=CalcXPos(ValueIndex);

    { Vertical positions of Open, High, Low & Close values for this point }
    YOpen :=CalcYPosValue(OpenValues.Value[ValueIndex]);
    YHigh :=CalcYPosValue(HighValues.Value[ValueIndex]);
    YLow  :=CalcYPosValue(LowValues.Value[ValueIndex]);
    YClose:=CalcYPosValue(CloseValues.Value[ValueIndex]);

    Left:=CandleWidth div 2; { calc half Candle Width }
    Right:=CandleWidth-Left;
  end;
end;