Contains all the candlesticks in the candlestick chart. Each item (TRSCandleStickChartValue) specifies one candlestick and its properties, including X, Open, Close, High, Low, Average, Color, and Caption. Use the Values collection to add, delete, and modify candlesticks in the chart.
Namespace: FMX.RS.BarCharts
Property Value
Type: TRSCandleStickChartValues
The following code sets up a TRSCandleStickChart to display a couple of candlesticks:
Delphi
|
var
Value: TRSCandleStickChartValue; // note, this type should be the same that the chart uses (e.g., TRS2DChartValue, TRSArrowChartValue, etc)
begin
RSCandleStickChart1.Style := csCandleStickHighLowCaps;
RSCandleStickChart1.BarSizePct := 75;
// Add first candlestick
Value := RSCandleStickChart1.Values.Add;
Value.X := EncodeDate(2014, 12, 24);
Value.Open := 82;
Value.Close := 93;
Value.High := 100;
Value.Low := 50;
Value.Average := 80;
Value.Color := clRed;
// Add second candlestick
Value := RSCandleStickChart1.Values.Add;
Value.X := EncodeDate(2014, 12, 31);
Value.Open := 70;
Value.Close := 79;
Value.High := 90;
Value.Low := 60;
Value.Average := 68;
Value.Color := clBlue;
end;
|
|