CandlestickChart
TsgcHTMLComponent_CandlestickChart — renderize um gráfico de candlestick OHLC em SVG com pavios, cores de alta/baixa e uma faixa de volume opcional, em Delphi, C++ Builder e .NET.
TsgcHTMLComponent_CandlestickChart — renderize um gráfico de candlestick OHLC em SVG com pavios, cores de alta/baixa e uma faixa de volume opcional, em Delphi, C++ Builder e .NET.
Adicione um ponto OHLC por barra com AddPoint (ou vincule um dataset) e então leia a propriedade HTML.
TsgcHTMLComponent_CandlestickChart
Gráfico OHLC SVG inline + faixa de volume opcional (sem biblioteca de gráficos)
Delphi, C++ Builder, .NET
Chame AddPoint(aLabel, aOpen, aHigh, aLow, aClose, aVolume) para cada barra (ou vincule um dataset) e então leia 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
Os membros que você usa com mais frequência.
AddPoint(aLabel, aOpen, aHigh, aLow, aClose, aVolume) adiciona uma barra OHLC e retorna o TsgcHTMLCandlestickPoint.
LoadFromDataSet(aDataSet, aDateField, aOpenField, aHighField, aLowField, aCloseField, aVolumeField) constrói a série a partir de uma query.
UpColor/DownColor pintam o corpo conforme a direção; WickColor substitui a cor da linha de máxima/mínima.
ShowVolume adiciona uma faixa de volume abaixo dos candles, escalada pela barra mais alta.
ShowAxis/ShowGrid/GridLines/FontSize/Decimals controlam o eixo de preço.
Width/Height/CandleWidth dimensionam o gráfico; MinValue/MaxValue com AutoMin/AutoMax fixam o intervalo de preço.
| Ajuda onlineReferência completa da API e guia de uso para este componente. | Abrir | |
| Todos os Componentes sgcHTMLExplore a matriz completa de recursos com mais de 80 componentes. | Abrir | |
| Baixar Versão de Avaliação GratuitaA avaliação de 30 dias inclui os projetos de demonstração 60.HTML. | Abrir | |
| PreçosLicenças Single, Team e Site com código-fonte completo. | Abrir |