HeatMapChart
The HeatMapChart component displays data values as a grid of cells, where the color intensity of each cell represents the magnitude of a numeric value. It is ideal for visualizing bivariate data distributions or correlations across two categorical dimensions.
Usage Example
Props
marks: Array<object> (required)
Each item in the array represents a single cell in the heatmap, defined by its X/Y coordinates and a value that determines the cell's color intensity.
Fields:
-
x: stringThe horizontal coordinate (e.g., category or label on the X-axis). -
y: stringThe vertical coordinate (e.g., category or label on the Y-axis). -
value: numberA numeric value used to determine the color intensity of the cell. Higher values typically produce darker or more saturated colors. -
Inherits all
ChartMarkPropsfor styling and customization, such as:foregroundStyleopacityannotationcornerRadiuszIndex, etc.
Use Cases
HeatMapChart is suitable for:
- Displaying correlation matrices
- Analyzing two-dimensional categorical data
- Visualizing frequency, density, or performance across paired factors
