Skip to main content

The Heat Map component for Retool Apps

A content area to display heat maps.

The Heat Map component renders data on an x-axis and y-axis, with a value for each point on the map. Heat Map is useful for visualizing intensity and identifying patterns or correlations.

For more information about using the Heat Map component, refer to the charts guide.

Properties

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

chartType

The type of chart to display.

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector > Content > Series > Chart type
Allowed Values
ValueUI OptionDescription
barBar

Bar Chart or Stacked Bar Chart.

bubbleBubble

Bubble Chart.

funnelFunnel

Funnel Chart.

heatmapHeatmap

Heat Map.

lineLine

Line Chart or Sparkline.

mixedMixed

Mixed Chart.

piePie

Pie Chart.

plotlyJsonPlotly JSON

Plotly JSON Chart.

sankeySankey

Sankey Chart.

scatterScatter

Scatter Chart.

sunburstSunburst

Sunburst Chart.

treemapTreemap

Treemap.

waterfallWaterfall

Waterfall Chart.

Examples
"bar"

clearOnEmptyData

Whether to clear the chart when the data is empty.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Content > Clear when data is empty
Default
false
Examples
true

colorArray

A list of colors to use when colorInputMode is colorArray.

Type array
Format Color
Array values string
Mutability
ControlUsage
Retool UI Inspector
Examples
["#ff0000", "#00ff00", "#0000ff"]

colorArrayDropDown

A list of colors to use when colorInputMode is colorArrayDropDown.

Type array
Format Color
Array values string
Mutability
ControlUsage
Retool UI Inspector > Appearance > Color selection
Examples
["#ff0000", "#00ff00", "#0000ff"]

colorInputMode

The mode for the color input.

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector > Appearance > Color selection
Allowed Values
ValueUI OptionDescription
colorArrayArray

Color array.

gradientColorArrayPalette

Gradient color array.

colorArrayDropDownManual

Color array dropdown.

Default
colorArray
Examples
"colorArray"

data

The data.

Type string | number | boolean | object | array
Format Custom data
Mutability
ControlUsage
Retool UI Inspector
MethodcopyToClipboard()

datasource

The source data when using UI Form.

Type array
Array values object
Mutability
ControlUsage
Retool UI Inspector

datasourceMode

The data source mode.

Type string
Mutability Read-only
Allowed Values
ValueDescription
manual

Manual.

source

Source.


gradientColorArray

A list of colors to use when colorInputMode is gradientColorArray.

Type array
Format Color
Array values string
Mutability
ControlUsage
Retool UI Inspector > Appearance > Color selection

heatmapShowScale

Whether to display the color scale legend.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Appearance > Show color scale legend on chart
Default
true
Examples
true

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Appearance > Hidden
MethodsetHidden()
Default
false
Examples
true

id

The unique identifier (name).

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector
Default
heatMap1
Examples
query1
button1

isHiddenOnDesktop

Whether to show or hide this object in the desktop layout.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Appearance > Advanced > Show on desktop
Default
false
Examples
true

isHiddenOnMobile

Whether to show or hide this object in the mobile layout.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Appearance > Advanced > Show on mobile
Default
true
Examples
true

legendPosition

The position of the legend.

Type string
Mutability
ControlUsage
Retool UI Inspector > Content > Add-ons > Legend position
Allowed Values
ValueUI OptionDescription
topAlign top

Top.

rightAlign right

Right.

bottomAlign bottom

Bottom.

leftAlign left

Left.

noneNo legend

None.


maintainSpaceWhenHidden

Whether to take up space on the canvas if hidden is true.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Appearance > Advanced > Maintain space when hidden
Default
false
Examples
true

margin

The amount of margin to render outside.

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector > Spacing > Margin
Allowed Values
ValueUI OptionDescription
4px 8pxNormal

Normal margin.

0None

No margin.

Default
4px 8px
Examples
4px 8px

rangeSlider

Whether to display a range slider.

Type boolean
Mutability
ControlUsage
Retool UI Inspector > Content > Add-ons > Range slider

selectedPoints

A list of selected points.

Type array
Array values object
Mutability Read-only

showInEditor

Whether the component remains visible in the editor if hidden is true.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Appearance > Advanced > Always show in edit mode
Default
false
Examples
true

title

The title text to display.

Type string
Mutability
ControlUsage
Retool UI Inspector

toolbar

The toolbar configuration.

Type object
Mutability
ControlUsage
Retool UI Inspector > Content > Add-ons > Toolbar
Object Properties

showAutoscale

Whether to show the Autoscale button.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector
Examples
true

showBoxSelect

Whether to show the Box select button.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector
Examples
true

showLassoSelect

Whether to show the Lasso select button.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector
Examples
true

showPan

Whether to show the Pan button.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector
Examples
true

showResetViews

Whether to show the Reset view button.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector
Examples
true

showToImage

Whether to show the Download as PNG button.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector
Examples
true

showZoomIn

Whether to show the Zoom in button.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector
Examples
true

showZoomOut

Whether to show the Zoom out button.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector
Examples
true

showZoomSelect

Whether to show the Zoom select button.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector
Examples
true


Methods

JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.

heatMap.scrollIntoView()

Scrolls the canvas or parent container so that the selected component appears in the visible area.

Definition
heatMap.scrollIntoView(options)
Parameters

options

The scroll options.

Type object
Object Properties

behavior

The scroll behavior.

Type string
Allowed Values
ValueDescription
auto

Scroll immediately to the specified position.

smooth

Scroll gradually to the specified position.


block

The scroll position relative to the component.

Type string
Allowed Values
ValueDescription
nearest

Scrolls only the minimum amount required for the component to appear in the visible area. Scrolling does not occur if the component is already in view.

start

Scrolls to position the component at the top of the visible area.

center

Scrolls to position the component in the middle of the visible area.

end

Scrolls to position the component at the bottom of the visible area.



Examples

Scroll the minimum amount to immediately bring heatMap into view.

heatMap.scrollIntoView({behavior: 'auto', block: 'nearest'});

heatMap.setHidden()

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

Definition
heatMap.setHidden(hidden)
Parameters

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide heatMap.

heatMap.setHidden(true);

Unhide heatMap.

heatMap.setHidden(false);

Events

Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.

EventDescription
ClearA value is cleared.
HoverAn item is hovered over.
Legend ClickA legend item is clicked or pressed.
Legend Double ClickA legend item is double-clicked or pressed.
SelectA value is selected.
UnhoverAn item is no longer hovered over.