menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class HeatMapEvents - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class HeatMapEvents

    Configure handlers to handle the events with the HeatMap component.

    Inheritance
    System.Object
    HeatMapEvents
    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.

    CellDoubleClicked

    Gets or sets an event callback function that will be called when the HeatMap cell in the HeatMap component is double clicked.

    Declaration
    public EventCallback<CellDoubleClickEventArgs> CellDoubleClicked { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<CellDoubleClickEventArgs>

    Accepts event callback function as value.

    Remarks

    This event callback function can be used to notify you when a HeatMap cell is double clicked. The CellDoubleClickEventArgs event argument can be used to obtain information about the current cell, such as the value bound to the cell, the x-axis label, the y-axis label, and so on.

    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. 

    LegendRendering

    Gets or sets an event callback function that will be invoked when the Heatmap component's legend items are rendered.

    Declaration
    public EventCallback<LegendRenderEventArgs> LegendRendering { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<LegendRenderEventArgs>

    Accepts event callback function as a value.

    Remarks

    This event callback function can be used to notify you when the legend items in the HeatMap component are rendered. The LegendRenderEventArgs event argument can be used to obtain the label of the legend item as well as a boolean value to cancel the rendering of the current legend item.

    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
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved