Skip to content

Cookie preferences

We use cookies for our own analytics and to see how our campaigns perform. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details.

Security, load balancing and remembering your cookie choice.

Show us which pages people read and how they find the site, so we can improve it (Google Analytics).

Show us which of our ad campaigns bring visitors to the site (Google Ads).

© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Bar & Histogram

The Bar Chart view shares its axis and series model with the Line Chart — the same X-axis, Y-axis, and Series sections control how data is structured. This page covers bar-specific features: horizontal orientation, stacking, grouping by telemetry value, and value labels. For the basics (axis setup, series, color zones, mixed charts, Y-axis control) see the Line Chart page.

Video: https://www.youtube.com/watch?v=Sc6vySTadCQ

By default bars are drawn vertically. To switch to a horizontal layout:

  1. Open View Settings.

  2. Enable Horizontal Bar mode.

When a bar chart has multiple series or Y-axis fields, each series is shown side by side by default. You can switch to a stacked layout to show contribution of each series to the total.

Three modes are available:

Mode Description
Stacking off Bars for each series rendered side by side (default)
Stacking on Bars stacked on top of each other, showing absolute totals
100% stacked Bars normalized to 100%, showing relative proportion per group

Control the stack mode in View Settings. Stacked mode can be combined with horizontal mode.

Use this pattern when a single telemetry payload contains both a numeric value and a category string, and you want to aggregate the numeric value per category.

Example payload — a machine reports the product type, the number of units produced, and the energy consumed per cycle:

{
"ts": 1540892498884,
"amount": 12,
"product": "glass",
"energy": 218
}

To build a chart showing energy consumed per product type, broken down by machine:

  1. Add the product field to the Series section with aggregation UNIQ — this groups the telemetry by product value.

  2. Add the energy field to the Y-axis section with aggregation SUM — this sums energy for each product group.

  3. Add the Machine name field to the X-axis section — this creates one bar group per machine.

X-axis: Machine name
Y-axis: energy (SUM)
Series: product (UNIQ)
Machine A Machine B
┌────┬────┬────┐ ┌────┬────┬────┐
│ │ │ │ │ │ │ │
│ ▓▓ │ ░░ │ ▒▒ │ │ ▓▓ │ ░░ │ ▒▒ │
└────┴────┴────┘ └────┴────┴────┘
glass cup bottle glass cup bottle
▓▓ = glass ░░ = cup ▒▒ = bottle

Show or hide numeric value labels on each bar:

  1. Open View Settings.

  2. Toggle the Labels checkbox.