Heatmap
TsgcHTMLComponent_Heatmap — renderize uma grade de heatmap SVG com escala de cores a partir de valores de células ou de um dataset vinculado, com legenda e rótulos de linha/coluna, em Delphi, C++ Builder e .NET.
TsgcHTMLComponent_Heatmap — renderize uma grade de heatmap SVG com escala de cores a partir de valores de células ou de um dataset vinculado, com legenda e rótulos de linha/coluna, em Delphi, C++ Builder e .NET.
Defina os rótulos de linha e coluna, preencha as células com SetCell (ou vincule um dataset) e então leia a propriedade HTML.
TsgcHTMLComponent_Heatmap
Grade de heatmap SVG inline + legenda opcional (sem biblioteca de gráficos)
Delphi, C++ Builder, .NET
Preencha RowLabels e ColumnLabels, chame SetCell(aRow, aCol, aValue) para cada ponto de dado (ou vincule um dataset) e então leia 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
Os membros que você usa com mais frequência.
SetCell(aRow, aCol, aValue) grava um valor; FindCell localiza um e ClearData esvazia a coleção Cells.
RowLabels e ColumnLabels são TStringLists que nomeiam cada linha e coluna da grade.
MinColor/MaxColor/EmptyColor misturam por célula; AutoMin/AutoMax fixam MinValue/MaxValue em vez de escalar a partir dos dados.
LoadFromDataSet(aDataSet, aRowField, aColField, aValueField) constrói a grade diretamente a partir de uma query.
CellSize/CellGap/Rounded moldam as células; ShowValues/Decimals/FontSize controlam os números exibidos.
ShowLegend desenha uma barra de gradiente de mínimo a máximo; ShowRowLabels/ShowColumnLabels alternam o texto dos eixos.
| 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 |