Live Platform
  • Introduction
  • Release Notes
    • Live 3
      • 3.59.0
      • 3.58.0
      • 3.57.0
      • 3.56.0
      • 3.55.0
      • 3.54.0
      • 3.53.0
      • 3.52.0
      • 3.51.0
      • 3.50.0
      • 3.49.0
      • 3.48.0
      • 3.47.0
      • 3.46.0
      • 3.45.0
      • 3.44.0
      • 3.43.0
      • 3.42.0
      • 3.41.0
      • 3.40.0
      • 3.39.0
      • 3.38.0
      • 3.37.0
      • 3.36.0
      • 3.35.0
      • 3.34.0
      • 3.33.0
      • 3.32.0
      • 3.31.0
      • 3.30.0
      • 3.29.0
      • 3.28.0
      • 3.27.0
      • 3.26.0
      • 3.25.0
      • 3.24.0
      • 3.23.0
      • 3.22.0
      • 3.21.0
      • 3.20.0
      • 3.19.0
      • 3.18.0
      • 3.17.0
      • 3.16.0
      • 3.15.0
      • 3.14.0
      • 3.13.0
      • 3.12.0
      • 3.11.0
      • 3.10.0
      • 3.9.0
      • 3.8.0
      • 3.7.0
      • 3.6.0
      • 3.5.0
      • 3.4.0
      • 3.3.0
      • 3.2.0
      • 3.1.0
      • 3.0.0
    • Live 2
  • Articles
    • Creating an aggregation
    • Creating a pipe
  • Theoretical Background
    • Fundamentals
    • Key Advantages
  • Platform Architecture
    • Introduction
    • Queries
    • Glossary
  • Featured plugins
    • Annotations
    • Groovy support
    • Messenger
    • Microsoft Teams
    • MongoDB
    • MongoDB Timeseries
    • MongoDB Kit
    • Purge plugin
    • SQL
    • TCP Input
    • TimescaleDB
  • Data visualization
    • Pipes widgets
      • Temporal
      • Cartesian
      • Multi-value snapshot
      • Single-value snapshot
      • Tables
      • Heatmap
      • JSX Widgets
      • Lollipop
      • Histogram
      • State Timeline
      • Boxplot
    • Pipes modifiers on Pipes charts
  • Alerts and notifications
    • Pipes modifiers on rules
  • Pipes Queries
    • Introduction
    • Dynamic filters
    • Meta parameters
    • Reducer
      • Uniform compress
      • PIP
    • Storage Hints
    • Execution Context
    • Event flow modifiers
  • Developers
    • Plugins
    • Packages
    • Backend API
      • Lookup Tables
      • Extensions
      • Settings
      • Storage Providers
      • Web Services
      • Web Setup
      • Entity Audit
    • Web application
      • Services
        • Point service
        • Menu service
      • Browser Compatibility
      • Runtime modules
        • Core Javascript modules
        • Library modules
        • Adding modules to runtime
      • Localization (i18n)
      • Date formatting
      • Dashboard and Widgets
        • Widget API
        • Custom widget editors
        • Live Event Types
        • Live Widget Configuration
        • Live Widget Packaging
        • Widget Request Interceptors
      • React Contexts
        • Dashboard
        • Dashboard widget
      • Registering Home Page options
    • Python application
    • Subscribing to Live Events
  • Administration
    • Configuration
      • Home Page Customization
      • live.properties
    • Infrastructure Monitoring
    • Storage Monitoring
    • Queries Monitoring
    • Logs Monitoring
    • Data Purging
  • Features
    • Access Permission
    • Datasources
    • Export Dashboard
    • Partial Indexes
    • WebApp Metrics
    • Entity Audit
Powered by GitBook
On this page
  • Pipes query
  • Cell settings
  • Cell value overwrite
  • Troubleshooting

Was this helpful?

  1. Data visualization
  2. Pipes widgets

Heatmap

A heatmap (or heat map) is a graphical representation of data where the individual values contained in a matrix are represented as color [Wikipedia].

PreviousTablesNextJSX Widgets

Last updated 3 years ago

Was this helpful?

Pipes query

The heat map pipes query should output events with a “point” property should be a seq with 3 values, corresponding to the x, y and value of each cell, correspondingly.

Figure 1: Heatmap example. A 10x10 matrix with values in each cell ranging from 0 to 1000.

For example, the following Pipes query (with span ts 1 to ts 10) will generate a hea tmap similar to Figure 1, outputting events similar to Figure 2:

=> random(), timestamp() as t every ms
=> @for range(10) |> (t, _ +1, random() * 1000//1):seq() as point

Cell settings

With the default cell settings (Figure 3), as long as there is a point for every one x and y values, the heat map will render with no spacing between the cells (see Figure 1). You can change this setting to make cells span over some range. Otherwise, there will be gaps between the cells.

Should we edit the previous query and multiply every y value for 2 we would have a space between every cell in the y axis, such as in Figure 4

=> random(), timestamp() as t every ms
=> @for range(10) |> (t, (_+1)*2, random() * 1000//1):seq() as point

Similarly, should we also multiply every x value for 3 we would have a space the size of two cells between every cell in the x axis, such as in Figure 5

=> random(), timestamp() as t every ms
=> @for range(10) |> (t*3, (_+1)*2, random() * 1000//1):seq() as point

If the spacing between cells is not desired, one can simply set column width to 3 and the row height to 2, setting depicted in Figure 6. In this case, the chart has one point every 3 X axis values so the column width is set to 3. It has one point every 2 y values so the row height is set to 2. With this setting, there will be no spaces between cells.

Cell value overwrite

Should new values arrive for an existing cell, that cell will show its most recent value

The following query will output a chart similar to the one in Figure 7:

=> random() every seconds
=> @for range(10) |> (random()*10//1, _, (random() * 1000)//1):seq() as point

Troubleshooting

  • Q: Chart shows no axis and no data

  • A: Data is not in the right format. Each event should have a “point” property with a seq containing the x,y and value for each cell. Check the Pipes Query section above on how to format the data output for more details.

  • Q: I have a working query outputting valid points but my chart looks blank

  • Q: Chart shows axis but no cells

  • A: There is probably too much space between cells making the cell sizes smaller than a pixel. Increase the cell settings width or height to match the data frequency. Read the cell settings above on how to set up the row height and column width to match the data frequency

  • Q: There are gaps between the cells

  • A: The cell width or height is too small. Increase the cell settings values to match the data frequency. Read the cell settings above on how to set up the row height and column width to match the data frequency

  • Q: Cells have irregular size

  • Q: Cells show over one another when I hover over them.

  • A: Cell settings have width or height settings values greater than the frequency of data. Reduce the cell settings width or height to match the data frequency. Read the cell settings above on how to set up the row height and column width to match the data frequency

Figure 2: Events containing the values of the cells in the first row, columns one to ten.
Figure 3: Default settings assume one cell for every integer in each of the X and Y axes.
Figure 4: Heat map with the default cell settings and one cell every 2 y values
Figure 5: Heat map with the default cell settings and one cell every 3 x values and every 2 y values
Figure 6: Cell settings to match data frequency
Figure 7: Chart with cell values being overwritten
Figure 8: Troubleshooting - Chart shows no axis and no data
Figure 9: Troubleshooting - Heat map with data but without any visible cells
Figure 10: Troubleshooting - Chart shows spaces between cells
Figure 11: Troubleshooting - Heatmap with cells with irregular sizes showing over other cells