Class HeatMapEvents
Configure handlers to handle the events with the HeatMap component.
Inheritance
Namespace: Syncfusion.Blazor.HeatMap
Assembly: Syncfusion.Blazor.dll
Syntax
public class HeatMapEvents : OwningComponentBase
Constructors
HeatMapEvents()
Declaration
public HeatMapEvents()
Properties
CellClicked
Triggers when you click the heat map cell in the HeatMap component.
Declaration
public EventCallback<CellClickEventArgs> CellClicked { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CellClickEventArgs> | An event callback function. |
CellRendering
Gets or sets an event callback that is raised on rendering each cell of the Heatmap component.
Declaration
public EventCallback<HeatMapCellRenderEventArgs> CellRendering { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<HeatMapCellRenderEventArgs> | An event callback function. |
Remarks
This event allows to customize the heatmap cell value, color, border color, font and, etc of each cell.
Examples
The following example demonstrates how to customize the cell value and color of the Heatmap component using the CellRendering
event.
<SfHeatMap DataSource="@dataSource">
<HeatMapEvents CellRendering="@CellRender"/>
<HeatMapTitleSettings Text="GDP Growth Rate for Major Economies (in Percentage)"/>
<HeatMapXAxis Labels="@xAxisLabels"/>
<HeatMapYAxis Labels="@yAxisLabels"/>
</SfHeatMap>
@code{
private void CellRender(HeatMapCellRenderEventArgs args)
{
if (args.CellValue == "2.2")
{
args.CellValue = "Low";
args.CellColor = "#EEEEEE";
}
}
double[,] dataSource = new double[2, 2]
{
{9.5, 2.2 },
{4.3, 8.9 }
};
string[] xAxisLabels = new string[] { "China", "India" };
string[] yAxisLabels = new string[] { "2008", "2009" };
}
CellSelected
Triggers when multiple cells get selected in the HeatMap component.
Declaration
public EventCallback<SelectedEventArgs> CellSelected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<SelectedEventArgs> | An event callback function. |
Created
Triggers when the component is created.
Declaration
public EventCallback<object> Created { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> | An event callback function. |
Destroyed
Triggers after the HeatMap is destroyed.
Declaration
public EventCallback<object> Destroyed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> | An event callback function. |
Loaded
Triggers after the HeatMap is loaded.
Declaration
public EventCallback<LoadedEventArgs> Loaded { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<LoadedEventArgs> | An event callback function. |
OnLoad
Triggers before the HeatMap is loaded.
Declaration
public EventCallback<LoadedEventArgs> OnLoad { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<LoadedEventArgs> | An event callback function. |
Resized
Triggers after resizing the Heatmap component.
Declaration
public EventCallback<ResizeEventArgs> Resized { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ResizeEventArgs> | An event callback function. |
TooltipRendering
Triggers when the HeatMap tooltip is rendered.
Declaration
public EventCallback<TooltipEventArgs> TooltipRendering { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<TooltipEventArgs> | An event callback function. |
Methods
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |