Star

ThingsBoard Documentation

Documentation for using ThingsBoard IoT Platform.

Bar & Histogram

Details about basic Bar chart you can find in Line Chart Configuration Main concept for line and bar charts are the same. In this tutorial we will focus on differences.

Horizontal Bars

By default bar chart is vertical. In some cases it is required to show data using vertical bars. For making it:

image image

Note horizontal mode available only when Y-axis contains one field. When multiple fields added to Y-axis and there are fields in Series section - horizontal bar would not display.

Stacked Bars

When bar chart contains multiple timeseries or series fields - each seria showed independently. And it is possible to enable stacked mode for bar charts. Here are few examples: stacking disabled, stacking enabled and 100% stacked bars.

image image image

You can control stack options in View Settings

image

Group By telemetry value

This option used when you need to group and aggregate data based on telemetry field value. For example we have machine that produce different cups. Machine submit telemetry that contains info:

Raw payload format is the following:

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

What we want to find - how many products with different types were produced. Or how much energy was consumed for producing products of certain type.

In both cases we need to group telemetry by product value and then apply required aggregation (in our case - SUM):

Now we now how much products in different categories were produced by different machines.

image

Labels

You can add/hide labels from the bar chart using checkbex in View Settings.

image