CandlestickChart
TsgcHTMLComponent_CandlestickChart — Delphi, C++ Builder 및 .NET에서 심지, 상승/하락 색상 및 선택적 거래량 스트립을 갖춘 SVG OHLC 캔들스틱 차트를 렌더링합니다.
TsgcHTMLComponent_CandlestickChart — Delphi, C++ Builder 및 .NET에서 심지, 상승/하락 색상 및 선택적 거래량 스트립을 갖춘 SVG OHLC 캔들스틱 차트를 렌더링합니다.
AddPoint로 봉마다 OHLC 포인트 하나를 추가한(또는 데이터셋을 바인딩한) 다음, HTML 속성을 읽습니다.
TsgcHTMLComponent_CandlestickChart
인라인 SVG OHLC 차트 + 선택적 거래량 스트립(차트 라이브러리 미사용)
Delphi, C++ Builder, .NET
봉마다 AddPoint(aLabel, aOpen, aHigh, aLow, aClose, aVolume)를 호출한(또는 데이터셋을 바인딩한) 다음, HTML을 읽습니다.
uses
sgcHTML_Component_CandlestickChart;
var
oChart: TsgcHTMLComponent_CandlestickChart;
begin
oChart := TsgcHTMLComponent_CandlestickChart.Create(nil);
try
oChart.Width := 800;
oChart.Height := 400;
oChart.ShowVolume := True;
oChart.AddPoint('Mon', 101.2, 104.8, 100.1, 103.5, 125000);
oChart.AddPoint('Tue', 103.5, 106.0, 102.8, 105.1, 98000);
oChart.AddPoint('Wed', 105.1, 105.4, 101.0, 101.9, 154000);
WebModule.Response := oChart.HTML; // SVG candles + wicks + volume strip
finally
oChart.Free;
end;
end;
// Or bind it straight to a dataset:
oChart.LoadFromDataSet(qryOHLC, 'TradeDate', 'OpenPrice', 'HighPrice',
'LowPrice', 'ClosePrice', 'Volume');
// includes: sgcHTML_Component_CandlestickChart.hpp
TsgcHTMLComponent_CandlestickChart *oChart = new TsgcHTMLComponent_CandlestickChart(NULL);
try
{
oChart->Width = 800;
oChart->Height = 400;
oChart->ShowVolume = true;
oChart->AddPoint("Mon", 101.2, 104.8, 100.1, 103.5, 125000);
oChart->AddPoint("Tue", 103.5, 106.0, 102.8, 105.1, 98000);
oChart->AddPoint("Wed", 105.1, 105.4, 101.0, 101.9, 154000);
String html = oChart->HTML; // SVG candles + wicks + volume strip
}
__finally
{
delete oChart;
}
using esegece.sgcWebSockets;
var chart = new TsgcHTMLComponent_CandlestickChart();
chart.Width = 800;
chart.Height = 400;
chart.ShowVolume = true;
chart.AddPoint("Mon", 101.2, 104.8, 100.1, 103.5, 125000);
chart.AddPoint("Tue", 103.5, 106.0, 102.8, 105.1, 98000);
chart.AddPoint("Wed", 105.1, 105.4, 101.0, 101.9, 154000);
string html = chart.HTML; // SVG candles + wicks + volume strip
가장 자주 사용하게 되는 멤버.
AddPoint(aLabel, aOpen, aHigh, aLow, aClose, aVolume)는 OHLC 봉 하나를 추가하고 TsgcHTMLCandlestickPoint를 반환합니다.
LoadFromDataSet(aDataSet, aDateField, aOpenField, aHighField, aLowField, aCloseField, aVolumeField)는 쿼리로부터 시리즈를 구성합니다.
UpColor/DownColor는 방향에 따라 몸통을 칠합니다. WickColor는 고가-저가 선의 색상을 재정의합니다.
ShowVolume는 가장 높은 봉에 맞춰 스케일링된 거래량 스트립을 캔들 아래에 추가합니다.
ShowAxis/ShowGrid/GridLines/FontSize/Decimals는 가격 축을 제어합니다.
Width/Height/CandleWidth는 차트 크기를 정합니다. AutoMin/AutoMax와 함께 사용하는 MinValue/MaxValue는 가격 범위를 고정합니다.