Skip to main content

Heatmap Chart

Rocket 2.0

The Heatmap Chart component shows values as a grid of shaded cells, such as tickets by weekday and hour or sales by region and month. Darker cells hold higher values.

Properties​

Property
Description
Expected Value
DataList of rows to chart. Rows that land in the same cell are added together.Array
Column fieldKey in each row that sets the cell's column.Text. Default: hour
Row fieldKey in each row that sets the cell's row.Text. Default: day
Value fieldKey in each row that holds the value to shade by.Text. Default: tickets
Column orderColumn labels in the order to show them. Labels not listed follow in the order they first appear in the data.Array
Row orderRow labels in the order to show them. Labels not listed follow in the order they first appear in the data.Array
Show valuesWrites each cell's value inside it.On or off. Default: Off
Cell gap (px)Space between cells, in pixels.Number. Default: 3
Value formatHow values are written: number, currency, percent or compact (like 12.5K). With percent, fractions such as 0.25 read as 25%.number, currency, percent, compact. Default: number
Currency codeCurrency code used when Value format is currency, such as USD or EUR.Text. Default: USD
LocaleNumber and currency format, such as pt-BR. Leave it empty to follow the currency.Text
Value prefixText added before each value.Text
Value suffixText added after each value.Text
Empty messageMessage shown when there is no data to chart.Text. Default: No data
LegendShows a color scale from the lowest to the highest value under the grid.On or off. Default: On
Highlight clicked pointOutlines the clicked cell and dims the others until another is clicked or Clear clicked point runs.On or off. Default: Off
Loading lookWhat the component shows while it is loading: a Spinner or a grey Skeleton placeholder.Spinner, Skeleton. Default: Spinner

Additional Actions​

Each of these can be switched on or off, or set with a logical expression by clicking fx.

Property
Description
Expected Value
VisibilityShows or hides the component. Hidden components keep their space unless Collapse when hidden is on.On or off. Default: On
Collapse when hiddenRemoves the hidden component's space, so the components below it move up.On or off. Default: Off
Loading stateShows the component's loading look and blocks interaction, for example while a query runs.On or off. Default: Off
DisableStops the user from interacting with the component.On or off. Default: Off

Devices​

Property
Description
Expected Value
Show on desktopShows the component in the desktop layout.On or off. Default: On
Show on mobileShows the component in the mobile layout.On or off. Default: Off

Events​

Add a handler from the Events section of the properties panel. See Event Triggers for the steps.

Event
Description
On clickTriggers when the user clicks a cell.
On double clickTriggers when the user double-clicks the chart.

Component Specific Actions (CSA)​

Run these from an event handler with Control Component, or from a RunJS query. See Component Specific Actions.

Action
Description
How To Access
Clear clicked pointClears the clicked cell and removes its highlight.components.heatmapchart1.clearClickedPoint()
Set visibilityShows the component when true, hides it when false.components.heatmapchart1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.heatmapchart1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.heatmapchart1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
dataList of rows to chart. Rows that land in the same cell are added together.{{components.heatmapchart1.data}}
xFieldKey in each row that sets the cell's column.{{components.heatmapchart1.xField}}
yFieldKey in each row that sets the cell's row.{{components.heatmapchart1.yField}}
valueFieldKey in each row that holds the value to shade by.{{components.heatmapchart1.valueField}}
xOrderColumn labels in the order to show them. Labels not listed follow in the order they first appear in the data.{{components.heatmapchart1.xOrder}}
yOrderRow labels in the order to show them. Labels not listed follow in the order they first appear in the data.{{components.heatmapchart1.yOrder}}
showValuesWrites each cell's value inside it.{{components.heatmapchart1.showValues}}
cellGapSpace between cells, in pixels.{{components.heatmapchart1.cellGap}}
yAxisFormatHow values are written: number, currency, percent or compact (like 12.5K). With percent, fractions such as 0.25 read as 25%.{{components.heatmapchart1.yAxisFormat}}
currencyCurrency code used when Value format is currency, such as USD or EUR.{{components.heatmapchart1.currency}}
localeNumber and currency format, such as pt-BR. Leave it empty to follow the currency.{{components.heatmapchart1.locale}}
valuePrefixText added before each value.{{components.heatmapchart1.valuePrefix}}
valueSuffixText added after each value.{{components.heatmapchart1.valueSuffix}}
emptyTextMessage shown when there is no data to chart.{{components.heatmapchart1.emptyText}}
showLegendShows a color scale from the lowest to the highest value under the grid.{{components.heatmapchart1.showLegend}}
highlightClickedOutlines the clicked cell and dims the others until another is clicked or Clear clicked point runs.{{components.heatmapchart1.highlightClicked}}
loadingIndicatorWhat the component shows while it is loading: a Spinner or a grey Skeleton placeholder.{{components.heatmapchart1.loadingIndicator}}
clickedDataPointThe last cell the user clicked, with its row label, column label and value under the Row field, Column field and Value field keys.{{components.heatmapchart1.clickedDataPoint}}
isVisibleWhether the component is visible.{{components.heatmapchart1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.heatmapchart1.isLoading}}
isDisabledWhether the component is disabled.{{components.heatmapchart1.isDisabled}}

Styles​

Style
Default
Chart color (the strongest cell)Theme: Brand primary
Label colorTheme: Placeholder text
Legend text colorTheme: Placeholder text
Box shadow0px 0px 0px 0px #00000040

A default that starts with Theme: follows the app's theme until the style is set to another value. See App Themes.