Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

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

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
22.5k 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.

Playing this video loads it from YouTube (Google), which sets cookies on its own domain. See our Cookie Policy.

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.