Skip to content

Heat table

A heat table can be used to show off a matrix of values. Use it to display how a single variable varies across all the combinations of two categorical variables.

sszvis.bar

The heat table does not have a special component. Instead, it is constructed using sszvis.bar by setting the width and height equal to each other, and with the use of the x- and y-position functions. Both x- and y-scales are ordinal scales which use the rangeBands function to calculate the output range.

Data structure

This component requires a flat array of objects, and each object is turned into one square in the heat table.

Minimum three dimensions

  • x-axis dimension
  • y-axis dimension
  • value (color) dimension

Configuration

Heat tables are based on sszvis.bar and thus have the same configuration options.

Chart

Heat Table — Kreise
Loading the chart…

Irregularly Binned Color Scale

Binned color scales can be used to group data and make it easier to see similar areas. For more on the different ways to construct binned color scales from a range of values, see Telling the Truth.

This example shows what age each partner in a partnership had when they had their first child.

Heat Table — Wer mit wem?
Loading the chart…

Regularly Binned Diverging Color Scale

This example uses regularly spaced bins and shows positive/negative trends through a diverging color scale.

Heat Table — Binned
Loading the chart…