syncfusion-blazor-heatmap-chart

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Implementing Syncfusion Blazor HeatMap Chart

实现Syncfusion Blazor HeatMap Chart

A comprehensive guide for implementing the Syncfusion Blazor HeatMap Chart component to visualize multi-dimensional data using color-coded cells in a matrix layout.
本文全面介绍如何实现Syncfusion Blazor HeatMap Chart组件,通过矩阵布局中的颜色编码单元格可视化多维数据。

When to Use This Skill

何时使用本技能

Use this skill when you need to:
  • Visualize matrix data with color gradients representing values
  • Display correlation matrices or comparison data across two dimensions
  • Create thermal or density visualizations showing data intensity
  • Show tabular data where cell colors represent magnitudes or categories
  • Implement bubble HeatMaps combining size and color to represent multiple data dimensions
  • Build data dashboards requiring intuitive grid-based visualizations
  • Display time-series data with category or datetime axes
  • Visualize large datasets with interactive tooltips and legends
  • Create accessible data visualizations with WCAG-compliant features
在以下场景中使用本技能:
  • 可视化矩阵数据:用颜色渐变表示数值
  • 展示相关性矩阵或跨维度的对比数据
  • 创建热力图或密度可视化:展示数据强度
  • 显示表格数据:用单元格颜色表示数值大小或类别
  • 实现气泡热图:结合大小与颜色表示多维度数据
  • 构建数据仪表盘:需要直观的基于网格的可视化
  • 展示时间序列数据:搭配类别轴或日期时间轴
  • 可视化大型数据集:搭配交互式工具提示和图例
  • 创建无障碍数据可视化:符合WCAG标准的功能

Component Overview

组件概述

The Syncfusion Blazor HeatMap Chart component (
SfHeatMap
) is a powerful data visualization tool that displays multi-dimensional data in a matrix of cells, where each cell's color represents its value. It supports:
  • Multiple data binding modes: Array (2D), JSON/Table, and Cell-based
  • Flexible axis types: Category, Numeric, and DateTime with multi-level labels
  • Two visualization modes: Rectangle cells and Bubble HeatMaps
  • Rich customization: Palettes (gradient/fixed), legends, tooltips, titles, and labels
  • Interactive features: Cell selection, events, and dynamic rendering
  • Accessibility: WCAG compliance, keyboard navigation, and screen reader support
  • Advanced features: Content Security Policy support, responsive sizing, performance optimization
Syncfusion Blazor HeatMap Chart组件(
SfHeatMap
)是强大的数据可视化工具,以单元格矩阵形式展示多维数据,每个单元格的颜色代表其数值。它支持:
  • 多种数据绑定模式:二维数组、JSON/表格、基于单元格
  • 灵活的轴类型:类别轴、数值轴、日期时间轴,支持多级标签
  • 两种可视化模式:矩形单元格和气泡热图
  • 丰富的自定义选项:调色板(渐变/固定)、图例、工具提示、标题和标签
  • 交互式功能:单元格选择、事件、动态渲染
  • 无障碍支持:符合WCAG标准、键盘导航、屏幕阅读器支持
  • 高级功能:内容安全策略支持、响应式尺寸、性能优化

Documentation and Navigation Guide

文档与导航指南

Getting Started & Installation

入门与安装

📄 Read: references/getting-started.md
  • Prerequisites and system requirements
  • Creating Blazor WebAssembly app (Visual Studio, VS Code, .NET CLI)
  • Installing Syncfusion.Blazor.HeatMap NuGet package
  • Registering Syncfusion Blazor service
  • Adding stylesheets and script resources
  • Import namespaces
  • First HeatMap component implementation
  • Basic data source configuration
  • Running and testing the application
📄 阅读: references/getting-started.md
  • 前提条件与系统要求
  • 创建Blazor WebAssembly应用(Visual Studio、VS Code、.NET CLI)
  • 安装Syncfusion.Blazor.HeatMap NuGet包
  • 注册Syncfusion Blazor服务
  • 添加样式表和脚本资源
  • 导入命名空间
  • 首个HeatMap组件实现
  • 基础数据源配置
  • 运行并测试应用

Data Binding & Working with Data

数据绑定与数据处理

📄 Read: references/working-with-data.md
  • Data source types overview (Array, JSON/Table, Cell)
  • Array data binding with 2D and multi-dimensional arrays
  • JSON/Table data binding with adaptor configuration
  • Cell data binding for individual cell customization
  • Field mapping for x-axis and y-axis
  • Data transformation patterns
  • Handling empty cells and null values
  • Performance considerations for large datasets
📄 阅读: references/working-with-data.md
  • 数据源类型概述(数组、JSON/表格、单元格)
  • 二维及多维数组的数据绑定
  • 带适配器配置的JSON/表格数据绑定
  • 基于单元格的数据绑定,支持单个单元格自定义
  • X轴与Y轴的字段映射
  • 数据转换模式
  • 处理空单元格与空值
  • 大型数据集的性能考量

Axis Configuration

轴配置

📄 Read: references/axis.md
  • Axis types: Category, Numeric, and DateTime
  • Category axis with custom labels
  • Numeric axis with range settings (min, max, interval)
  • DateTime axis with formatting and interval types
  • Axis label customization (rotation, alignment, style)
  • Axis label templates
  • Multi-level labels for hierarchical data
  • Axis inversions and opposed positioning
  • Axis title configuration
📄 阅读: references/axis.md
  • 轴类型:类别轴、数值轴、日期时间轴
  • 带自定义标签的类别轴
  • 带范围设置(最小值、最大值、间隔)的数值轴
  • 带格式化和间隔类型的日期时间轴
  • 轴标签自定义(旋转、对齐、样式)
  • 轴标签模板
  • 分层数据的多级标签
  • 轴反转与反向定位
  • 轴标题配置

Appearance & Customization

外观与自定义

📄 Read: references/appearance.md
  • Cell customizations (borders, highlighting, tile types)
  • Margin configuration for spacing
  • Title settings (text, alignment, text style)
  • Data label configuration (visibility, format, templates)
  • Border configuration (width, radius, color)
  • Background and container styling
  • Text style customization (size, color, font family, weight)
  • Template support for data labels
  • Responsive design considerations
📄 阅读: references/appearance.md
  • 单元格自定义(边框、高亮、瓦片类型)
  • 间距的边距配置
  • 标题设置(文本、对齐、文本样式)
  • 数据标签配置(可见性、格式、模板)
  • 边框配置(宽度、圆角、颜色)
  • 背景与容器样式
  • 文本样式自定义(大小、颜色、字体、粗细)
  • 数据标签的模板支持
  • 响应式设计考量

Color Palettes

调色板

📄 Read: references/palette.md
  • Palette types: Fixed and Gradient
  • Fixed palette with color mapping and value ranges
  • Gradient palette with color progression
  • Custom color schemes
  • Color for empty and null cells
  • Built-in palette presets
  • Color accessibility considerations
  • Color gradient modes (Table, Row, Column)
📄 阅读: references/palette.md
  • 调色板类型:固定色板与渐变色板
  • 带颜色映射和数值范围的固定色板
  • 带颜色渐变的渐变色板
  • 自定义配色方案
  • 空单元格与空值的颜色设置
  • 内置调色板预设
  • 颜色无障碍考量
  • 颜色渐变模式(表格、行、列)

Legend Configuration

图例配置

📄 Read: references/legend.md
  • Legend visibility and positioning
  • Legend types (Gradient, List)
  • Legend customization (width, height, alignment)
  • Smart legend with toggle cell visibility
  • Show percentage in legend
  • Legend text style customization
  • Legend title configuration
  • Segment configuration
  • Template support for legend items
📄 阅读: references/legend.md
  • 图例可见性与定位
  • 图例类型(渐变、列表)
  • 图例自定义(宽度、高度、对齐)
  • 可切换单元格可见性的智能图例
  • 在图例中显示百分比
  • 图例文本样式自定义
  • 图例标题配置
  • 分段配置
  • 图例项的模板支持

Tooltips

工具提示

📄 Read: references/tooltip.md
  • Enabling and configuring tooltips
  • Tooltip content customization
  • Tooltip templates for array data
  • Tooltip templates for JSON data
  • Tooltip text style customization
  • Border and fill customization
  • Animation settings
  • Conditional tooltip display
📄 阅读: references/tooltip.md
  • 启用并配置工具提示
  • 工具提示内容自定义
  • 数组数据的工具提示模板
  • JSON数据的工具提示模板
  • 工具提示文本样式自定义
  • 边框与填充自定义
  • 动画设置
  • 条件性工具提示显示

Events & Interactivity

事件与交互性

📄 Read: references/events.md
  • Component lifecycle events (Load, Loaded)
  • CellClick event with event arguments
  • CellDoubleClick event
  • CellRender event for custom cell rendering
  • TooltipRender event for dynamic tooltip content
  • LegendRender event for legend customization
  • AxisLabelRender event for custom axis labels
  • Event handling patterns and best practices
  • Performance considerations with events
📄 阅读: references/events.md
  • 组件生命周期事件(Load、Loaded)
  • 带事件参数的CellClick事件
  • CellDoubleClick事件
  • 用于自定义单元格渲染的CellRender事件
  • 用于动态工具提示内容的TooltipRender事件
  • 用于图例自定义的LegendRender事件
  • 用于自定义轴标签的AxisLabelRender事件
  • 事件处理模式与最佳实践
  • 事件的性能考量

Bubble HeatMap Variant

气泡热图变体

📄 Read: references/bubble-heatmap.md
  • Bubble HeatMap overview and use cases
  • Enabling bubble type (TileType.Bubble)
  • Bubble size configuration based on values
  • Bubble size types (Absolute, Percentage)
  • Bubble color mapping
  • Combining bubble size and color for multi-dimensional data
  • Data requirements for bubble HeatMaps
  • Best practices for bubble visualizations
📄 阅读: references/bubble-heatmap.md
  • 气泡热图概述与使用场景
  • 启用气泡类型(TileType.Bubble)
  • 基于数值的气泡大小配置
  • 气泡大小类型(绝对、百分比)
  • 气泡颜色映射
  • 结合气泡大小与颜色展示多维数据
  • 气泡热图的数据要求
  • 气泡可视化的最佳实践

Advanced Features

高级功能

📄 Read: references/advanced-features.md
  • Dimensions and sizing (width, height, responsive sizing)
  • Cell selection modes (Cell, Column, Row)
  • Selection customization
  • Content Security Policy (CSP) compliance
  • Accessibility features (WCAG, WAI-ARIA, keyboard navigation)
  • Screen reader support
  • Performance optimization for large datasets
  • Virtualization strategies
  • Server-side rendering considerations
📄 阅读: references/advanced-features.md
  • 尺寸设置(宽度、高度、响应式尺寸)
  • 单元格选择模式(单元格、列、行)
  • 选择自定义
  • 内容安全策略(CSP)合规
  • 无障碍功能(WCAG、WAI-ARIA、键盘导航)
  • 屏幕阅读器支持
  • 大型数据集的性能优化
  • 虚拟化策略
  • 服务器端渲染考量

API Reference

API参考

📄 Read: references/api-reference.md
  • SfHeatMap<TValue> main component
  • Core settings classes (Cell, Title, Palette, Legend, Tooltip)
  • Axis classes (HeatMapXAxis, HeatMapYAxis)
  • Multi-level label configuration
  • Bubble configuration classes
  • Styling classes (borders, text styles, margins)
  • Event argument classes
  • Enumerations (CellType, PaletteType, AdaptorType, etc.)
  • Complete property and method reference
📄 阅读: references/api-reference.md
  • SfHeatMap<TValue>主组件
  • 核心设置类(Cell、Title、Palette、Legend、Tooltip)
  • 轴类(HeatMapXAxis、HeatMapYAxis)
  • 多级标签配置
  • 气泡配置类
  • 样式类(边框、文本样式、边距)
  • 事件参数类
  • 枚举类型(CellType、PaletteType、AdaptorType等)
  • 完整的属性与方法参考

Quick Start Example

快速入门示例

Here's a minimal example to get started with the HeatMap Chart component:
razor
@page "/heatmap"
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@HeatMapData">
    <HeatMapTitleSettings Text="Sales Revenue per Employee (in 1000 US$)"></HeatMapTitleSettings>
    <HeatMapCellSettings ShowLabel="true" TileType="CellType.Rect"></HeatMapCellSettings>
</SfHeatMap>

@code {
    int[,] GetDefaultData()
    {
        int[,] dataSource = new int[,]
        {
            {52, 65, 67, 45, 37, 52},
            {68, 52, 63, 51, 30, 51},
            {7, 16, 47, 47, 88, 6},
            {66, 64, 46, 40, 47, 41},
            {14, 46, 97, 69, 69, 3},
            {54, 46, 61, 46, 40, 39}
        };
        return dataSource;
    }
    
    public object HeatMapData { get; set; }
    
    protected override void OnInitialized()
    {
        HeatMapData = GetDefaultData();
    }
}
Prerequisites:
  1. Install
    Syncfusion.Blazor.HeatMap
    NuGet package
  2. Register Syncfusion service:
    builder.Services.AddSyncfusionBlazor();
  3. Add theme stylesheet and script reference in
    index.html
  4. Add namespace:
    @using Syncfusion.Blazor.HeatMap
以下是使用HeatMap Chart组件的最简示例:
razor
@page "/heatmap"
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@HeatMapData">
    <HeatMapTitleSettings Text="Sales Revenue per Employee (in 1000 US$)"></HeatMapTitleSettings>
    <HeatMapCellSettings ShowLabel="true" TileType="CellType.Rect"></HeatMapCellSettings>
</SfHeatMap>

@code {
    int[,] GetDefaultData()
    {
        int[,] dataSource = new int[,]
        {
            {52, 65, 67, 45, 37, 52},
            {68, 52, 63, 51, 30, 51},
            {7, 16, 47, 47, 88, 6},
            {66, 64, 46, 40, 47, 41},
            {14, 46, 97, 69, 69, 3},
            {54, 46, 61, 46, 40, 39}
        };
        return dataSource;
    }
    
    public object HeatMapData { get; set; }
    
    protected override void OnInitialized()
    {
        HeatMapData = GetDefaultData();
    }
}
前提条件:
  1. 安装
    Syncfusion.Blazor.HeatMap
    NuGet包
  2. 注册Syncfusion服务:
    builder.Services.AddSyncfusionBlazor();
  3. index.html
    中添加主题样式表和脚本引用
  4. 添加命名空间:
    @using Syncfusion.Blazor.HeatMap

Common Patterns

常见模式

Pattern 1: JSON Data with Custom Axes

模式1:带自定义轴的JSON数据

razor
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@JsonData">
    <HeatMapDataSourceSettings IsJsonData="true" 
                               AdaptorType="AdaptorType.Table" 
                               XDataMapping="ProductName"
                               YDataMapping="Year" 
                               ValueMapping="Value">
    </HeatMapDataSourceSettings>
    <HeatMapXAxis Labels="@XAxisLabels"></HeatMapXAxis>
    <HeatMapYAxis Labels="@YAxisLabels"></HeatMapYAxis>
</SfHeatMap>

@code {
    private object[] JsonData = new object[]
    {
        new { ProductName = "Laptop", Year = "2022", Value = 150 },
        new { ProductName = "Desktop", Year = "2022", Value = 80 },
        // ... more data
    };
    
    private string[] XAxisLabels = new string[] { "Laptop", "Desktop", "Tablet", "Phone" };
    private string[] YAxisLabels = new string[] { "2022", "2023", "2024" };
}
razor
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@JsonData">
    <HeatMapDataSourceSettings IsJsonData="true" 
                               AdaptorType="AdaptorType.Table" 
                               XDataMapping="ProductName"
                               YDataMapping="Year" 
                               ValueMapping="Value">
    </HeatMapDataSourceSettings>
    <HeatMapXAxis Labels="@XAxisLabels"></HeatMapXAxis>
    <HeatMapYAxis Labels="@YAxisLabels"></HeatMapYAxis>
</SfHeatMap>

@code {
    private object[] JsonData = new object[]
    {
        new { ProductName = "Laptop", Year = "2022", Value = 150 },
        new { ProductName = "Desktop", Year = "2022", Value = 80 },
        // ... 更多数据
    };
    
    private string[] XAxisLabels = new string[] { "Laptop", "Desktop", "Tablet", "Phone" };
    private string[] YAxisLabels = new string[] { "2022", "2023", "2024" };
}

Pattern 2: Gradient Palette with Custom Colors

模式2:带自定义颜色的渐变色板

razor
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@HeatMapData">
    <HeatMapPaletteSettings Type="PaletteType.Gradient">
        <HeatMapPalettes>
            <HeatMapPalette Color="#C2E7EC" Value="0"></HeatMapPalette>
            <HeatMapPalette Color="#AEDFE6" Value="25"></HeatMapPalette>
            <HeatMapPalette Color="#7FCDC4" Value="50"></HeatMapPalette>
            <HeatMapPalette Color="#6EB5D0" Value="75"></HeatMapPalette>
            <HeatMapPalette Color="#2D6CA2" Value="100"></HeatMapPalette>
        </HeatMapPalettes>
    </HeatMapPaletteSettings>
</SfHeatMap>
razor
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@HeatMapData">
    <HeatMapPaletteSettings Type="PaletteType.Gradient">
        <HeatMapPalettes>
            <HeatMapPalette Color="#C2E7EC" Value="0"></HeatMapPalette>
            <HeatMapPalette Color="#AEDFE6" Value="25"></HeatMapPalette>
            <HeatMapPalette Color="#7FCDC4" Value="50"></HeatMapPalette>
            <HeatMapPalette Color="#6EB5D0" Value="75"></HeatMapPalette>
            <HeatMapPalette Color="#2D6CA2" Value="100"></HeatMapPalette>
        </HeatMapPalettes>
    </HeatMapPaletteSettings>
</SfHeatMap>

Pattern 3: Bubble HeatMap with Size and Color

模式3:带大小与颜色的气泡热图

razor
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@BubbleData">
    <HeatMapCellSettings TileType="CellType.Bubble" 
                         BubbleType="BubbleType.SizeAndColor">
        <HeatMapBubbleSize Minimum="10" Maximum="30"></HeatMapBubbleSize>
    </HeatMapCellSettings>
    <HeatMapDataSourceSettings IsJsonData="true" 
                               AdaptorType="AdaptorType.Cell"
                               XDataMapping="XAxis"
                               YDataMapping="YAxis"
                               ValueMapping="Value">
        <HeatMapBubbleDataMapping Size="Size" Color="Value"></HeatMapBubbleDataMapping>
    </HeatMapDataSourceSettings>
</SfHeatMap>
razor
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@BubbleData">
    <HeatMapCellSettings TileType="CellType.Bubble" 
                         BubbleType="BubbleType.SizeAndColor">
        <HeatMapBubbleSize Minimum="10" Maximum="30"></HeatMapBubbleSize>
    </HeatMapCellSettings>
    <HeatMapDataSourceSettings IsJsonData="true" 
                               AdaptorType="AdaptorType.Cell"
                               XDataMapping="XAxis"
                               YDataMapping="YAxis"
                               ValueMapping="Value">
        <HeatMapBubbleDataMapping Size="Size" Color="Value"></HeatMapBubbleDataMapping>
    </HeatMapDataSourceSettings>
</SfHeatMap>

Pattern 4: Interactive HeatMap with Events

模式4:带事件的交互式热图

razor
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@HeatMapData">
    <HeatMapEvents CellClicked="@OnCellClick"
                   TooltipRendering="@OnTooltipRender">
    </HeatMapEvents>
    <HeatMapTooltipSettings>
        <Template>
            @{
                var data = context as TooltipEventArgs;
                <div>@data.XLabel - @data.YLabel: @data.Value</div>
            }
        </Template>
    </HeatMapTooltipSettings>
</SfHeatMap>

@code {
    private void OnCellClick(Syncfusion.Blazor.HeatMap.CellClickEventArgs args)
    {
        Console.WriteLine($"Cell clicked: {args.XLabel}, {args.YLabel}, Value: {args.Value}");
    }
    
    private void OnTooltipRender(Syncfusion.Blazor.HeatMap.TooltipEventArgs args)
    {
        // Customize tooltip content dynamically
    }
}
razor
@using Syncfusion.Blazor.HeatMap

<SfHeatMap DataSource="@HeatMapData">
    <HeatMapEvents CellClicked="@OnCellClick"
                   TooltipRendering="@OnTooltipRender">
    </HeatMapEvents>
    <HeatMapTooltipSettings>
        <Template>
            @{
                var data = context as TooltipEventArgs;
                <div>@data.XLabel - @data.YLabel: @data.Value</div>
            }
        </Template>
    </HeatMapTooltipSettings>
</SfHeatMap>

@code {
    private void OnCellClick(Syncfusion.Blazor.HeatMap.CellClickEventArgs args)
    {
        Console.WriteLine($"Cell clicked: {args.XLabel}, {args.YLabel}, Value: {args.Value}");
    }
    
    private void OnTooltipRender(Syncfusion.Blazor.HeatMap.TooltipEventArgs args)
    {
        // 动态自定义工具提示内容
    }
}

Key Properties Reference

关键属性参考

PropertyTypePurpose
DataSource
objectSets the data for the HeatMap (array, JSON, or cell data)
Width
stringSets the width of the HeatMap (e.g., "100%", "600px")
Height
stringSets the height of the HeatMap (e.g., "400px")
HeatMapCellSettings.ShowLabel
boolShows or hides cell labels
HeatMapCellSettings.TileType
CellTypeSets cell type (Rect or Bubble)
HeatMapDataSourceSettings.IsJsonData
boolIndicates if data source is JSON format
HeatMapDataSourceSettings.AdaptorType
AdaptorTypeSets adaptor type (Table, Cell, None)
HeatMapPaletteSettings.Type
PaletteTypeSets palette type (Fixed or Gradient)
HeatMapLegendSettings.Visible
boolShows or hides legend
HeatMapTooltipSettings
objectConfigures tooltip appearance and content
HeatMapXAxis.ValueType
ValueTypeSets x-axis type (Category, Numeric, DateTime)
HeatMapYAxis.ValueType
ValueTypeSets y-axis type (Category, Numeric, DateTime)
属性类型用途
DataSource
object设置HeatMap的数据(数组、JSON或单元格数据)
Width
string设置HeatMap的宽度(例如:"100%", "600px")
Height
string设置HeatMap的高度(例如:"400px")
HeatMapCellSettings.ShowLabel
bool显示或隐藏单元格标签
HeatMapCellSettings.TileType
CellType设置单元格类型(Rect或Bubble)
HeatMapDataSourceSettings.IsJsonData
bool指示数据源是否为JSON格式
HeatMapDataSourceSettings.AdaptorType
AdaptorType设置适配器类型(Table、Cell、None)
HeatMapPaletteSettings.Type
PaletteType设置调色板类型(Fixed或Gradient)
HeatMapLegendSettings.Visible
bool显示或隐藏图例
HeatMapTooltipSettings
object配置工具提示的外观与内容
HeatMapXAxis.ValueType
ValueType设置X轴类型(Category、Numeric、DateTime)
HeatMapYAxis.ValueType
ValueType设置Y轴类型(Category、Numeric、DateTime)

Common Use Cases

常见使用场景

Use Case 1: Sales Performance Dashboard

场景1:销售业绩仪表盘

Visualize sales performance across products and time periods using a HeatMap with gradient colors to highlight high and low performers.
When to use: Monthly/quarterly sales tracking, product comparison, regional performance analysis.
使用带渐变色的热图可视化不同产品和时间段的销售业绩,突出表现优异和不佳的产品。
适用场景: 月度/季度销售跟踪、产品对比、区域业绩分析。

Use Case 2: Correlation Matrix

场景2:相关性矩阵

Display correlation coefficients between multiple variables in a matrix format with diverging color scheme.
When to use: Statistical analysis, data science projects, feature correlation analysis.
用发散配色方案以矩阵形式展示多个变量之间的相关系数。
适用场景: 统计分析、数据科学项目、特征相关性分析。

Use Case 3: Server Resource Monitoring

场景3:服务器资源监控

Monitor server CPU, memory, or network usage across multiple servers over time periods.
When to use: DevOps dashboards, infrastructure monitoring, capacity planning.
跨多个服务器和时间段监控CPU、内存或网络使用率。
适用场景: DevOps仪表盘、基础设施监控、容量规划。

Use Case 4: Calendar HeatMap

场景4:日历热图

Show activity levels or event frequencies across days and months in a calendar-style layout.
When to use: GitHub-style contribution graphs, attendance tracking, activity logs.
以日历样式展示不同日期和月份的活动水平或事件频率。
适用场景: GitHub风格贡献图、出勤跟踪、活动日志。

Use Case 5: Bubble HeatMap for Multi-Dimensional Data

场景5:多维数据的气泡热图

Use bubble size to represent one metric (e.g., sales volume) and color to represent another (e.g., profit margin).
When to use: Comparing two related metrics simultaneously, portfolio analysis, competitive positioning.
用气泡大小表示一个指标(如销量),颜色表示另一个指标(如利润率)。
适用场景: 同时对比两个相关指标、投资组合分析、竞争定位。

Related Skills

相关技能

  • For TreeMap visualization, see Syncfusion Blazor TreeMap
  • For other data visualization components, explore the Data Visualization category
  • 如需TreeMap可视化,请查看Syncfusion Blazor TreeMap
  • 如需其他数据可视化组件,请探索数据可视化分类

Best Practices

最佳实践

  1. Choose appropriate palette types: Use gradient palettes for continuous data and fixed palettes for categorical data
  2. Enable tooltips: Always provide tooltips for better data interpretation
  3. Use meaningful axis labels: Ensure axis labels clearly describe the data dimensions
  4. Optimize for large datasets: Consider data sampling or virtualization for datasets with thousands of cells
  5. Test accessibility: Verify keyboard navigation and screen reader compatibility
  6. Responsive sizing: Use percentage-based width for responsive layouts
  7. Color accessibility: Ensure sufficient color contrast and avoid relying solely on color to convey information
  8. Performance: Minimize complex event handlers and template rendering for better performance
  1. 选择合适的调色板类型:连续数据使用渐变色板,分类数据使用固定色板
  2. 启用工具提示:始终提供工具提示以提升数据解读体验
  3. 使用有意义的轴标签:确保轴标签清晰描述数据维度
  4. 优化大型数据集:对于包含数千个单元格的数据集,考虑数据采样或虚拟化
  5. 测试无障碍性:验证键盘导航和屏幕阅读器兼容性
  6. 响应式尺寸:使用百分比宽度实现响应式布局
  7. 颜色无障碍:确保足够的颜色对比度,避免仅依赖颜色传达信息
  8. 性能优化:尽量减少复杂事件处理程序和模板渲染以提升性能

Troubleshooting Quick Guide

快速故障排除指南

IssueSolution
HeatMap not displayingVerify NuGet package installation and service registration
Data not showingCheck DataSource binding and data format matches adaptor type
Colors not appearingConfigure HeatMapPaletteSettings with appropriate palette type
Tooltips not workingEnsure HeatMapTooltipSettings is configured with valid content
Axis labels missingSet Labels property on HeatMapXAxis/HeatMapYAxis
Performance issuesReduce cell count, disable animations, or implement virtualization
For detailed troubleshooting, refer to the specific reference files for each feature area.
问题解决方案
HeatMap未显示验证NuGet包安装和服务注册
数据未显示检查DataSource绑定,确保数据格式与适配器类型匹配
颜色未显示配置HeatMapPaletteSettings并选择合适的调色板类型
工具提示不工作确保HeatMapTooltipSettings配置了有效内容
轴标签缺失在HeatMapXAxis/HeatMapYAxis上设置Labels属性
性能问题减少单元格数量、禁用动画或实现虚拟化
如需详细故障排除,请参考各功能领域的具体参考文档。