Heatmap
TsgcHTMLComponent_Heatmap — renderizza una griglia heatmap SVG a scala di colore da valori di cella o da un dataset associato, con legenda ed etichette di riga/colonna, in Delphi, C++ Builder e .NET.
TsgcHTMLComponent_Heatmap — renderizza una griglia heatmap SVG a scala di colore da valori di cella o da un dataset associato, con legenda ed etichette di riga/colonna, in Delphi, C++ Builder e .NET.
Imposta le etichette di riga e colonna, riempi le celle con SetCell (oppure collega un dataset), quindi leggi la proprietà HTML.
TsgcHTMLComponent_Heatmap
Inline SVG heatmap grid + optional legend (no chart library)
Delphi, C++ Builder, .NET
Popola RowLabels e ColumnLabels, chiama SetCell(aRow, aCol, aValue) per ogni punto dati (oppure collega un dataset), quindi leggi 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
I membri che utilizzerai più spesso.
SetCell(aRow, aCol, aValue) scrive un valore; FindCell ne cerca uno e ClearData svuota la collezione Cells.
RowLabels e ColumnLabels sono TStringList che assegnano un nome a ciascuna riga e colonna della griglia.
MinColor/MaxColor/EmptyColor si fondono per cella; AutoMin/AutoMax fissano MinValue/MaxValue invece di calcolarli dai dati.
LoadFromDataSet(aDataSet, aRowField, aColField, aValueField) costruisce la griglia direttamente da una query.
CellSize/CellGap/Rounded definiscono la forma delle celle; ShowValues/Decimals/FontSize controllano i numeri stampati.
ShowLegend disegna una barra a gradiente dal minimo al massimo; ShowRowLabels/ShowColumnLabels attivano o disattivano il testo degli assi.
| Guida in lineaRiferimento API completo e guida all’uso per questo componente. | Apri | |
| Tutti i componenti sgcHTMLEsplora la matrice completa delle funzionalità di oltre 80 componenti. | Apri | |
| Scarica la Prova GratuitaLa prova di 30 giorni include i progetti demo 60.HTML. | Apri | |
| PrezziLicenze Single, Team e Site con codice sorgente completo. | Apri |