CandlestickChart
TsgcHTMLComponent_CandlestickChart — renderiza un gráfico de velas OHLC en SVG con mechas, colores de subida/bajada y una franja de volumen opcional, en Delphi, C++ Builder y .NET.
TsgcHTMLComponent_CandlestickChart — renderiza un gráfico de velas OHLC en SVG con mechas, colores de subida/bajada y una franja de volumen opcional, en Delphi, C++ Builder y .NET.
Añade un punto OHLC por barra con AddPoint (o vincula un dataset), y luego lee la propiedad HTML.
TsgcHTMLComponent_CandlestickChart
Gráfico OHLC SVG en línea + franja de volumen opcional (sin librería de gráficos)
Delphi, C++ Builder, .NET
Llama a AddPoint(aLabel, aOpen, aHigh, aLow, aClose, aVolume) para cada barra (o vincula un dataset), y luego lee 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
Los miembros que usarás con más frecuencia.
AddPoint(aLabel, aOpen, aHigh, aLow, aClose, aVolume) añade una barra OHLC y devuelve el TsgcHTMLCandlestickPoint.
LoadFromDataSet(aDataSet, aDateField, aOpenField, aHighField, aLowField, aCloseField, aVolumeField) construye la serie desde una consulta.
UpColor/DownColor pintan el cuerpo según la dirección; WickColor sobrescribe el color de la línea máximo-mínimo.
ShowVolume añade una franja de volumen debajo de las velas, escalada a la barra más alta.
ShowAxis/ShowGrid/GridLines/FontSize/Decimals controlan el eje de precios.
Width/Height/CandleWidth dimensionan el gráfico; MinValue/MaxValue junto con AutoMin/AutoMax fijan el rango de precios.
| Ayuda en líneaReferencia completa de la API y guía de uso para este componente. | Abrir | |
| Todos los componentes de sgcHTMLExplora la matriz completa de más de 80 componentes. | Abrir | |
| Descargar prueba gratuitaLa prueba de 30 días incluye los proyectos de demostración 60.HTML. | Abrir | |
| PreciosLicencias Single, Team y Site con código fuente completo. | Abrir |