Heatmap Chart
A heatmap is a grid-based chart where each cell sits at the intersection of two categorical variables and is colored according to its numeric value. Color intensity replaces bar length or line position, making patterns across large matrices immediately visible.
Heatmaps excel at revealing patterns, correlations, and outliers across two categorical dimensions.
An example of an embedded heatmap chart
Creating an Effective Heatmap Chart
Recommended data types for each axis:
- X-Axis Categorical data
- Y-Axis Categorical data
- Values Numerical values (determine the color of each cell)
Description
- Grid - rows and columns form a matrix; each cell represents the intersection of one X-axis and one Y-axis category
- Color scale - a sequential or diverging color palette maps numeric values to colors; darker or more saturated colors typically indicate higher values
- Legend - displays the color scale with corresponding value ranges
- Cell labels - optional numerical annotations inside each cell for precise readability on smaller grids
When to Use a Heatmap
- Identify high and low values at a glance - color makes peaks and troughs stand out across the entire matrix
- Show relationships between two categorical variables - understand how different categories interact based on a shared numeric measure
- Detect clusters and outliers - groups of similar-colored cells reveal concentrations, and isolated bright cells flag anomalies
- Visualize large tables - when a numerical table has too many rows and columns to scan, color encoding makes patterns scannable
- Analyze time-based patterns - with days on one axis and hours on the other, heatmaps are a classic tool for spotting activity patterns
Choosing a Color Palette
- Sequential palettes - a single hue progressing from light to dark (e.g., light blue → dark blue) works well for data that has a natural low-to-high progression
- Diverging palettes - two contrasting hues meeting at a neutral midpoint (e.g., blue → white → red) highlight deviations above and below a central value, such as positive and negative growth rates
- Avoid rainbow palettes - perceptually uneven color progressions create false visual steps and are harder for colorblind readers
When to Avoid a Heatmap
- Very few data points - a simple table is more direct when the matrix is small (e.g., 3×3)
- Exact value comparisons are critical - color differences are less precise than bar length; use a bar chart when exact numbers drive decisions
- Negative and positive values without a neutral reference - use a diverging palette and make the zero point explicit, otherwise mixed-sign data is easy to misread
- Unordered categories with no meaningful pattern - if neither axis has a logical order, the chart may look random regardless of the data