Skip to main content
Version: 2027.02 Beta
View as Markdown

Perspective - Heatmap

The default display for a Heatmap component.

Component Palette Icon:

The Heatmap component palette icon within the Perspective Components panel.

The Heatmap component visualizes magnitude across two categorical or temporal dimensions simultaneously. Each cell in the grid represents the intersection of an x and y category, colored by value. Common use cases include overall equipment effectiveness by hour and day-of-week, alarm frequency by equipment and shift, process variable intensity maps, production quality matrices, and more.

The Heatmap component has two pre-configured variants:

  • Grid: The magnitude across two categorical dimensions, communicated by a stepped scale of colors with clear boundaries. This chart can be configured into multiple operational zones, including normal, caution, and alarm.
  • Gradient: The magnitude across two categorical dimensions, communicated by a continuous interpolated scale of colors. This chart is best for data with no natural breakpoints.

Properties​

NameDescriptionProperty Type
dataThe dataset powering the chart. Each row is one cell. The xField and yField categories represent the cells and valueKey represents the magnitude. Options include:
  • xField: Row key read for the x-axis category. Value is string.
  • yField: Row key read for the y-axis category. Value is string.
  • valueField: Row key read for the cell value. Value is string.
array
xAxisConfigures the x-axis category. See xAxis Properties for more object properties.object
yAxisConfigures the y-axis category. See yAxis Properties for more object properties.object
visualMapMaps each cell's value to a color. See visualMap Properties for more object properties.object
dataLabelsConfigures the value label rendered inside each cell. Options include:
  • visible: Shows the value label inside each cell. Default is true for the Grid variant, and false for Gradient variant. Value is boolean.
  • fontSize: Font size of the cell label text. Value is numeric.
  • color: Cell label color. This color is fixed to each cell. Leave empty for automatic per-cell contrast. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.
  • format: The label text template. Tokens serve as placeholders that will be replaced with live data during runtime. Tokens include {x} for the column category, {y} for the row category, and {value} for the cell value. Value is string.
  • elementStyle: Text style for a label rendered onto a chart canvas, including typography, alignment, optional box styling, and shadow.
object
titleConfigures the chart title and subtitle, including options for text, styling, and layout customization. See title Properties for more object properties.object
tooltipThe tooltip shown on hover. See tooltip Properties for more object properties.object
appearanceConfigures chart-level visuals. See appearance Properties for more object properties.object
styleStyles defined within the Project to be applied to this component.object

xAxis Properties​

NameDescriptionProperty Type
visibleShows the x-axis when true. Default is true.boolean
titleThe name of the x-axis, shown alongside tick labels. Options include:
  • visible: Shows the axis title when true. Default is true. Value is boolean.
  • text: Axis title text. Leave empty for no title. Value is string.
  • color: Color of the axis title text. Leave empty to use the theme label color. Takes precedence over elementStyle.color. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.
  • fontSize: Font size of the axis title text. Takes precedence over elementStyle.fontSize. Value is numeric.
  • position: Determines whether the title sits along the start, middle, or end of the axis. Default is middle. Value is string.
  • gap: Distance in pixels between the axis title and axis line. Value is numeric.
  • rotation: The axis title rotation in degrees. Value is numeric.
  • elementStyle: Text style for a label rendered onto a chart canvas, including typography, alignment, optional box styling, and shadow.
object
positionDetermines whether data renders along the top or bottom of the x-axis. Default is bottom.string
labelsConfigures the tick value label text. Options include:
  • visible: Shows the tick value label text when true. Default is true. Value is boolean.
  • rotation: Rotation of the tick labels in degrees. Value is numeric.
  • width: Max width in pixels before overflow handling occurs. To avoid long categories crowding the plot, leave this value as empty to cap long labels automatically. Value is numeric.
  • overflow: How labels wider than the maximum allowed width are handled. Can be none, truncate, break, and breakAll. Value is string.
  • color: Color of the x-axis label text. Takes precedence over elementStyle.color when both are set. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.
  • fontSize: Font size of the x-axis label text. Takes precedence over elementStyle.fontSize when both are set.
  • format: Optional number pattern for numeric categories. For example, 0,0.0. Ignored by text properties. Value is numeric.
  • elementStyle: Text style for a label rendered onto a chart canvas, including typography, alignment, optional box styling, and shadow.
object

yAxis Properties​

NameDescriptionProperty Type
visibleShows the y-axis when true. Default is true.boolean
titleThe name of the y-axis, shown alongside tick labels. Options include:
  • visible: Shows the axis title when true. Default is true. Value is boolean.
  • text: Axis title text. Leave empty for no title. Value is string.
  • color: Color of the axis title text. Leave empty to use the theme label color. Takes precedence over elementStyle.color. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.
  • fontSize: Font size of the axis title text. Takes precedence over elementStyle.fontSize. Value is numeric.
  • position: Determines whether the title sits along the start, middle, or end of the axis. Default is middle. Value is string.
  • gap: Distance in pixels between the axis title and axis line. Value is numeric.
  • rotation: The axis title rotation in degrees. Value is numeric.
  • elementStyle: Text style for a label rendered onto a chart canvas, including typography, alignment, optional box styling, and shadow.
object
positionDetermines whether data renders to the right or left of the y-axis. Default is left.string
labelsConfigures the tick value label text. Options include:
  • visible: Shows the tick value label text when true. Default is true. Value is boolean.
  • rotation: Rotation of the tick labels in degrees. Value is numeric.
  • width: Max width in pixels before overflow handling occurs. To avoid long categories crowding the plot, leave this value as empty to cap long labels automatically. Value is numeric.
  • overflow: Configures how labels wider than the maximum allowed width are handled. Can be none, truncate, break, and breakAll. Value is string.
  • color: Color of the y-axis label text. Takes precedence over elementStyle.color when both are set. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.
  • fontSize: Font size of the y-axis label text. Takes precedence over elementStyle.fontSize when both are set.
  • format: Optional number pattern for numeric categories. For example, 0,0.0. Ignored by text properties. Value is numeric.
  • elementStyle: Text style for a label rendered onto a chart canvas, including typography, alignment, optional box styling, and shadow.
object

visualMap Properties​

NameDescriptionProperty Type
modeThe differentiator between the Heatmap variants. Setting the mode to either grid or gradient will swap between one of the two variants.string
emptyColorThe fill color for empty or non-numeric cells. Leave empty to draw no cell. Note that the grid background will still show through the cell when not drawn.color
piecesA list of ordered value ranges and their colors. Only applies to the Grid variant. List order matters, as the last entry will treat max as inclusive. Leave empty to use the theme default color ramp.
  • min: The inclusive lower boundary value. Leave empty for an open lower range. Value is numeric.
  • max: The exclusive upper boundary value. Leave empty for an open upper range. If this is the last object within the pieces array, defaults to inclusive. Value is numeric.
  • color: Color of the cell when the value falls between the specified min and max range. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.
  • label: Label text for this range in the color-scale legend. Value is string.
array
invertReverses the color mapping when true. Only applies to the Gradient variant. Default is false.boolean
minMinimum value of the color scale. Only applies to the Gradient variant. Can be a number, or leave empty to fit the provided data.numeric
maxMaximum value of the color scale. Only applies to the Gradient variant. Can be a number, or leave empty to fit the provided data.numeric
gradientColors used for the Gradient variant's continuous color ramp. Only applies to the Gradient variant. Color ramp includes endpoint colors plus optional interior stops. Colors can be chosen from the color wheel, color palette, or entered as RGB or HSL values. See Color Selector. Options include:
  • colorLow: Color at the low end of the range.
  • colorHigh: Color at the high end of the value range.
  • stops: Optional interior color stops, enabling diverging ramps. Options include:
    • percent: Position along the ramp, from 0 - 100. Value is numeric.
    • color: The color at this stop.
object
legendThe color-scale legend shown alongside the grid. The Grid variant renders individual color band swatches, while the Gradient variant renders a continuous color bar. Options include:
  • visible: Shows the color-scale legend when true. Default is true. Value is boolean.
  • position: The placement of the color-scale legend within the chart. Value is string.
  • orientation: Layout direction of the color-scale legend. Leave empty to follow the default placement. horizontal places the legend along the top and bottom edges of the chart. vertical places it along the sides and corners of the chart. Value is string.
  • interactive: If true, hovering over a color band in the legend filters the chart to highlight all corresponding cells within that band. If false, filtering is disabled. Can also be set to single to isolate one band at a time. Value is string or boolean.
  • width: Thickness of the continuous color bar in pixels. Only applicable for the Gradient variant. Value is numeric.
  • length: Length of the continuous color bar in pixels. Only applicable for the Gradient variant. Leave empty to use the default bar length. Value is numeric.
  • wrapLabels: If true, wraps wide color band labels across multiple lines. This ensures that the labels stay beside the grid instead of overlapping cells. If false, keeps each label on one line. Use legend.gap to reserve the extra width. Value is boolean.
  • gap: The extra space in pixels between the legend and the plot. The more this value increases, the more the grid and axes are pushed away from the legend when labels crowd eachother. Value is numeric.
  • color: Color of the legend text. Takes precedence over elementStyle.color when both are set. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.
  • fontSize: Font size of the legend text. Takes precedence over elementStyle.fontSize when both are set.
  • elementStyle: Text style for a label rendered onto a chart canvas, including typography, alignment, optional box styling, and shadow.
object

title Properties​

NameDescriptionProperty Type
visibleShows the title of the chart when true.boolean
textThe main title text.string
colorColor of the main title text. Takes precedence over elementStyle.color when both are set. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.color
fontSizeThe font size of the main title text. Takes precedence over elementStyle.fontSize when both are set.numeric
subtitleConfigures the subtitle displayed below the main title. Options include:
  • text: Subtitle text. Value is string.
  • color: Color of the subtitle text. Takes precedence over elementStyle.color when both are set. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.
  • fontSize: Font size of the subtitle text. Takes precedence over elementStyle.fontSize when both are set. Value is numeric.
  • elementStyle: Text style for a label rendered onto a chart canvas, including typography, alignment, optional box styling, and shadow.
object
positionThe position of the title within the chart.string
gapThe gap in pixels between the main title and subtitle.numeric
elementStyleText style for a label rendered onto a chart canvas, including typography, alignment, optional box styling, and shadow.object

tooltip Properties​

NameDescriptionProperty Type
enabledShows the tooltip on hover when true.boolean
formatterSets the tooltip display format. Options include:
  • type: Sets the format type as either value or template. value reformats the value inside the tooltip, while template replaces the default tooltip format entirely with a customized template. Value is string.
  • value: The value to apply to the cell, keeping the default tooltip text. Only applicable when formatter.type is set to value. Value is string.
  • template: Your own tooltip text, replacing the default layout. Applicable tokens include {x} for the column category, {y} for the row category, {value} for the cell value, and {marker} as an indicator dot. Leave empty to display the default tooltip. Only applicable when formatter.type is set to template. Value is string.
object

appearance Properties​

NameDescriptionProperty Type
borderWidthWidth of each cell's border in pixels. Set to 0 to remove cell borders.numeric
borderColorCell border color. Leave empty to use the default theme. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.color
borderRadiusCorner radius of each cell in pixels.numeric
backgroundColorBackground fill for the entire chart component. Leave empty for transparent. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.color
highlightConfigures cell styling when hovered over or highlighted by the legend. Options include:
  • itemStyle: Visual style for a shape element rendered onto a chart canvas. Options include:
    • shadowColor: The color of the drop-shadow in multi-line text format. Default is rgba(0, 0, 0, 0.5). Value is string.
    • shadowBlur: The drop-shadow blur radius in pixels. Value is numeric.
  • lightness: The shift in brightness applied to a highlighted cell's fill on a -1 to 1 scale. Positive values lighten while negative values darken. The default value 0 leaves the fill unchanged, so the drop shadow alone carries the highlight. Decimal values are accepted. Ignored when itemStyle.color is set. Value is numeric.
  • dimOpacity: The opacity other cells fade to when a single cell is hovered over or a legend band is highlighted. Opacity is set on a 0 to 1 scale, with decimal values accepted. Lower values dim, while a full 1 disables dimming. Opacity fading honors the chart's animation settings. Default is 0.25. Value is numeric.
  • dimTransitionDuration: The duration in milliseconds of the dim fade-in/out animation when hovering over a cell or legend band. Default is 180 milliseconds. Only applies when chart animation is enabled. Value is numeric.
object
animationConfigures chart-level entry and transition animation. Options include:
  • enabled: Enables chart animation on render and update when true. Default is true. Value is boolean.
  • entry: Initial animation applied when the chart first renders.
    • duration: Entry animation duration in milliseconds. Value is numeric.
    • easing: Easing function applied to the entry animation. Value is string.
    • delay: Delay before the entry animation starts in milliseconds. Value is numeric.
  • transition: Update animation applied when chart data changes.
    • duration: Transition animation duration in milliseconds.
    • easing: Easing function applied to the transition animation.
    • delay: Delay before the transition animation starts in milliseconds.
object

Component Scripts and Events​

Further component interaction and functionality can be configured for all components through scripting and event actions. Right-click on the component or select Components from the Designer menubar to access the configuration popups for both of these options:

  • Configure Events: Accesses the Event Configuration popup where you can configure actions to run in response to events to make the component dynamic. The Events Configurations page shows how to configure events and actions on a Perspective component.

  • Configure Scripts: Accesses the Script Configuration popup where custom methods and message handlers can be added. The Scripting in Perspective section details scripting fundamentals, creating custom methods, and using message handlers.

The Heatmap component also has Component Events associated with it. See the Heatmap - Line Scripting page for more information.

Examples​

Grid Example​

An example of a Grid Heatmap component displaying the sample data below.

This example showcases color-coded values across the same days at different times using a Grid variant. The sample data used in this example is listed below in JSON format.

[
{
"props": {
"data": [
{
"hour": "00:00",
"day": "Mon",
"value": 87
},
{
"hour": "00:00",
"day": "Tue",
"value": 91
},
{
"hour": "00:00",
"day": "Wed",
"value": 78
},
{
"hour": "01:00",
"day": "Mon",
"value": 83
},
{
"hour": "01:00",
"day": "Tue",
"value": 95
},
{
"hour": "01:00",
"day": "Wed",
"value": 64
}
],
"xField": "hour",
"yField": "day",
"xAxis": {
"title": {
"text": "Hour"
},
"labels": {
"fontSize": 12
}
},
"yAxis": {
"title": {
"text": "Day"
},
"labels": {
"fontSize": 12
}
},
"visualMap": {
"emptyColor": "#E6E6E6",
"pieces": [
{
"min": 85,
"max": "",
"color": "#2DB87A",
"label": "World Class"
},
{
"min": 65,
"max": 85,
"color": "#E0A020",
"label": "Acceptable"
},
{
"min": "",
"max": 65,
"color": "#D84C3F",
"label": "Needs Improvement"
}
],
"legend": {
"orientation": "vertical",
"wrapLabels": false,
"gap": 80,
"fontSize": 12
}
},
"appearance": {
"borderWidth": 1,
"borderColor": "#FFFFFF"
}
}
}
]

Gradient Example​

An example of a Gradient Heatmap component displaying the sample data below.

This example showcases how color-coded statuses could display across different zones on a factory floor using a Gradient variant. The sample data used in this example is listed below in JSON format.

[
{
"props": {
"data": [
{
"value": 42.3,
"x": "Zone A",
"y": "Sensor 1"
},
{
"x": "Zone A",
"y": "Sensor 2",
"value": 67.8
},
{
"x": "Zone B",
"y": "Sensor 1",
"value": 88.1
},
{
"x": "Zone B",
"y": "Sensor 2",
"value": 31.4
}
],
"xAxis": {
"labels": {
"fontSize": 12
}
},
"yAxis": {
"labels": {
"fontSize": 12
}
},
"visualMap": {
"mode": "gradient",
"emptyColor": "#E6E6E6",
"min": 0,
"max": 100,
"gradient": {
"colorLow": "#1A5FAD",
"colorHigh": "#E8590C"
},
"legend": {
"orientation": "vertical"
}
},
"appearance": {
"borderWidth": 1,
"borderColor": "#FFFFFF"
}
}
}
]