Bar Chart

The Bar Chart allows you to display proportional data across one or more devices.

Bar Chart Dashboard


Data Type

Data Type

The Bar Chart can display points as a live stream (re-rendering the chart every time a data point hits the platform) or as an historical chart. Each style has its own advantages:

  • Live stream charts provide feedback with more immediacy than historical charts, as they do not require a dashboard data refresh to populate with new data. If one of the block’s segments references multiple devices by ID or tag, the block will update anytime any of those devices reports state for the chosen attribute. For this reason we recommend one device per segment when building live stream blocks.
  • Historical charts allow for data to be aggregated according to a number of rules (based on time durations, mathematical functions and the combination of data from multiple sources), and they also allow for viewing past dashboard states.


To view the current state of your device(s), select “Last received data point”. To view an aggregation of your data over a given time period, choose any other value. This option is removed when “Live Stream” is selected for the block’s data type.

Bar Chart Duration

Block Data

Each bar in the Bar Chart represents one data set. In the example above, each bar represents the number of remaining pours in a keg.

Each series can graph a single device state attribute. The data type of the state attribute must be set to Number to be properly visualized.

Bar Chart Data Set

Each series can also aggregate the same attribute across multiple devices; therefore, Device IDs / Tags should be populated with a device query to aggregate data for one or more devices per series.

In the event that a duration other than “Last received data point” is chosen, or if more than one device is selected for a data set (either by manually choosing multiple devices or by specifying a device tag), an aggregation method must be defined for your data set. This determines how the data is represented on the graph when multiple data points are present.

Bar Chart Aggregation

When this is graphed, it is now a single bar that contains the sum of all pours across the different devices.

Data Transformation

You may apply an expression to data points in the segment. You have access to the following variables when evaluating the expression:

  • {{value}}: The raw value of the data point.
  • {{time}}: The time of the corresponding data point in milliseconds since Epoch.
  • {{ctx.VARIABLE_NAME}}: The value of a given context variable.

The performed transformation will not affect the raw data returned by your query, but will adjust the data before it is applied to the chart. If an invalid expression is provided, the data point reverts to its raw value.

Was this page helpful?

Still looking for help? You can also search the Losant Forums or submit your question there.