Heatmap
TsgcHTMLComponent_Heatmap — renderiza una cuadrícula de mapa de calor SVG con escala de color a partir de valores de celda o un dataset vinculado, con leyenda y etiquetas de fila/columna, en Delphi, C++ Builder y .NET.
TsgcHTMLComponent_Heatmap — renderiza una cuadrícula de mapa de calor SVG con escala de color a partir de valores de celda o un dataset vinculado, con leyenda y etiquetas de fila/columna, en Delphi, C++ Builder y .NET.
Define las etiquetas de fila y columna, rellena las celdas con SetCell (o vincula un dataset), y luego lee la propiedad HTML.
TsgcHTMLComponent_Heatmap
Cuadrícula de mapa de calor SVG en línea + leyenda opcional (sin librería de gráficos)
Delphi, C++ Builder, .NET
Rellena RowLabels y ColumnLabels, llama a SetCell(aRow, aCol, aValue) para cada dato (o vincula un dataset), y luego lee HTML.
uses
sgcHTML_Component_Heatmap;
var
oHeatmap: TsgcHTMLComponent_Heatmap;
begin
oHeatmap := TsgcHTMLComponent_Heatmap.Create(nil);
try
oHeatmap.RowLabels.CommaText := 'Mon,Tue,Wed,Thu,Fri';
oHeatmap.ColumnLabels.CommaText := '9h,12h,15h,18h';
oHeatmap.ShowLegend := True;
oHeatmap.ShowValues := True;
oHeatmap.SetCell(0, 0, 12);
oHeatmap.SetCell(0, 1, 48);
oHeatmap.SetCell(1, 2, 76);
oHeatmap.SetCell(4, 3, 92);
WebModule.Response := oHeatmap.HTML; // SVG grid, min->max colour scale
finally
oHeatmap.Free;
end;
end;
// Or bind it straight to a dataset:
oHeatmap.LoadFromDataSet(qryTraffic, 'DayName', 'HourSlot', 'Visits');
// includes: sgcHTML_Component_Heatmap.hpp
TsgcHTMLComponent_Heatmap *oHeatmap = new TsgcHTMLComponent_Heatmap(NULL);
try
{
oHeatmap->RowLabels->CommaText = "Mon,Tue,Wed,Thu,Fri";
oHeatmap->ColumnLabels->CommaText = "9h,12h,15h,18h";
oHeatmap->ShowLegend = true;
oHeatmap->ShowValues = true;
oHeatmap->SetCell(0, 0, 12);
oHeatmap->SetCell(0, 1, 48);
oHeatmap->SetCell(1, 2, 76);
oHeatmap->SetCell(4, 3, 92);
String html = oHeatmap->HTML; // SVG grid, min->max colour scale
}
__finally
{
delete oHeatmap;
}
using esegece.sgcWebSockets;
var heatmap = new TsgcHTMLComponent_Heatmap();
heatmap.RowLabels.CommaText = "Mon,Tue,Wed,Thu,Fri";
heatmap.ColumnLabels.CommaText = "9h,12h,15h,18h";
heatmap.ShowLegend = true;
heatmap.ShowValues = true;
heatmap.SetCell(0, 0, 12);
heatmap.SetCell(0, 1, 48);
heatmap.SetCell(1, 2, 76);
heatmap.SetCell(4, 3, 92);
string html = heatmap.HTML; // SVG grid, min->max colour scale
Los miembros que usarás con más frecuencia.
SetCell(aRow, aCol, aValue) escribe un valor; FindCell busca uno y ClearData vacía la colección Cells.
RowLabels y ColumnLabels son TStringList que nombran cada fila y columna de la cuadrícula.
MinColor/MaxColor/EmptyColor se combinan por celda; AutoMin/AutoMax fijan MinValue/MaxValue en lugar de escalar a partir de los datos.
LoadFromDataSet(aDataSet, aRowField, aColField, aValueField) construye la cuadrícula directamente desde una consulta.
CellSize/CellGap/Rounded dan forma a las celdas; ShowValues/Decimals/FontSize controlan los números impresos.
ShowLegend dibuja una barra de degradado de mínimo a máximo; ShowRowLabels/ShowColumnLabels activan o desactivan el texto de los ejes.
| 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 |