Skip to content
Stand with Ukraine flag

State Chart

The State chart widget displays how an entity’s state changes over time as a timeline of colored segments. It is ideal for tracking discrete state transitions such as online/offline, active/inactive, or open/closed — making device availability, process transitions, and system activity easy to monitor at a glance.

  • Visualizes state transitions as colored timeline segments showing exactly when and how a state changed.
  • Works with any telemetry data type: string, integer, double, boolean, or JSON.
  • Multiple series: monitor state history for several devices or parameters on one chart.
  • Customizable state mapping: assign specific labels and colors to each state value.
  • Comparison mode: overlay the same state series from a previous time period for pattern analysis.
  • Configurable fill style (solid or gradient) for the area beneath the state line.
  1. Open the dashboard in edit mode. Click Add widget in the top toolbar, or click the Add new widget icon in the center of an empty dashboard.
  2. In the widget bundle selection dialog, find and click Charts.
  3. Select the State chart widget.
  4. Configure the datasource, series, states, and appearance, then click Add.

All settings in this section use Basic mode — a quick-start configuration covering the essentials. For finer widget controls like custom tooltip functions and advanced axis formatting, switch to the Advanced tab.

The Basic tab groups settings into: Time window, Datasource, Series, States, Y axes, Appearance, Chart, X axis, Legend, Tooltip, Animation, and Card appearance.

Define the time interval to display, like Last 24 hours or Current day. Learn more in the Time window guide.

Select the source of state data:

  • Device — a specific device; shows the state history of this device over the configured time range.
  • Entity alias — a set of entities matched by an entity alias; use this to display state timelines for multiple devices on the same chart.

The widget supports two display modes: Series and Comparison.

Each data key is rendered as an independent state timeline. Add a key for each state parameter to display, like connected or doorState. Each series updates dynamically as new telemetry arrives.

The telemetry key can contain any supported data type:

  • String — like "online", "offline", or "maintenance".
  • Integer — like 0, 1, 2 representing different states.
  • Double — like 1.0, 2.5 for numeric state indicators.
  • Boolean — like true = active, false = inactive.
  • JSON — like {"state": "running"}; the widget extracts and displays the nested value.

Click the settings icon on a series row to open the Data key configuration dialog with General and Advanced tabs.

General tab:

SettingDescription
KeyTelemetry or attribute key name.
LabelLegend label for this series.
DecimalsDecimal places for displayed values.
ColorSeries color used for the state line and fill.
Use data post-processing functionOptional JavaScript transform applied to the raw value before display. Signature: f(value, latestData).

Advanced tab — Legend:

SettingDescription
Show in legendInclude this series in the chart legend.
Hidden by defaultSeries is rendered but hidden in the legend until toggled by the user.

Advanced tab — Y axis: Select which Y axis this series is plotted against.

Advanced tab — Fill: Shade the area beneath the state line. Options: None, Opacity (solid fill with transparency), Gradient (set start and end opacity values).

Advanced tab — Tooltip value format function: Optional JavaScript function f(value, latestData) to format the value shown in the hover tooltip for this series.

Advanced tab — Comparison settings: Enable Show historical data for comparison to plot a comparison series from a previous time period alongside this series. Configure Comparison key label (auto or custom) and Comparison data color.

In Comparison mode, the widget overlays the same data keys from a previous time period on top of the current data — for example, today vs. yesterday or this week vs. last week. Each period is rendered as a separate state timeline, making it easy to spot recurring patterns or behavioral changes.

Switch to the Comparison tab in the Series section to enable this mode. Each comparison entry has an interval dropdown, an X axis button, and a list of data keys (Show, Key, Label, Color).

Comparison interval options:

OptionDescription
Previous interval (default)Shifts the time window back by one full interval length.
Day agoCompares with the same period from 24 hours earlier.
Week agoCompares with the same period from 7 days earlier.
Month agoCompares with the same period from one month earlier.
Year agoCompares with the same period from one year earlier.
Custom intervalEnter a custom offset in milliseconds.

Comparison X axis settings — click the X axis button to configure how the comparison time axis is displayed:

SettingDescription
ShowDisplay the comparison X axis on the chart.
LabelText label for the comparison axis.
PositionTop or Bottom.
Tick labelsShow date/time labels on ticks. Configure font and color.
Show ticksRender tick marks on the axis.
Show lineRender the axis baseline.
Show split linesRender vertical grid lines for each tick.

The States section maps each possible telemetry value to a human-readable label displayed on the Y axis. Click Add state to add a new row.

FieldDescription
LabelThe state label shown on the Y axis, like Online, Offline, or Maintenance.
Ticks valueThe numeric position of this state on the Y axis, like 0 for inactive or 1 for active.
SourceConstant — the state matches a single exact value. Range — the state matches any value within a defined range.
Value typeData type of the incoming telemetry value: String, Integer, Double, Boolean, or JSON.
Value / RangeThe exact value (Constant) or the min/max range (Range) that activates this state.

Configure one or more Y axes to control vertical scaling and labeling. Each series can be assigned to a different axis via its Y axis field in the series settings. Click Add Y axis to add a new axis.

Each axis row shows the following columns:

ColumnDescription
IdUnique identifier used to assign series to this axis.
ShowToggle axis visibility on the chart.
LabelText label shown next to the axis.
PositionLeft or Right.
Min / MaxFixed scale bounds. Set explicitly to match the range of your ticks values — for example, 0 to 1 for a two-state boolean.
UnitsUnit suffix for axis tick labels.
DecimalsDecimal places for tick label values.

Click the settings icon on an axis row to open the Y axis settings dialog:

SettingDescription
LabelText label with configurable font and color.
Tick labelsShow value labels on each tick. Configure font and color.
Show ticksRender tick marks on the axis line.
Show lineRender the axis baseline.
Show split linesRender horizontal grid lines across the chart for each tick.
Ticks intervalInterval between ticks. Auto derives it from the data range.
Split numberSuggested number of tick intervals. Auto lets the chart decide.

Controls the chart title displayed in the widget header.

SettingDescription
TitleText shown in the widget header. Configure font, size, weight, and color. Toggle to hide the title entirely.
Card iconOptional icon displayed next to the title.

Controls interactive behavior and chart area layout.

SettingDescription
Data zoomEnable horizontal zoom for inspecting narrow time ranges without changing the dashboard time window.
GridAdjust padding inside the chart area.
Stack modeAccumulate multiple series on the same axis, useful for showing overlapping state histories.

Configure the horizontal time axis. Use the Show toggle to hide the axis entirely.

SettingDescription
LabelText label displayed along the axis. Configure font and color.
PositionBottom or Top.
Tick labelsShow date/time labels on each tick. Configure date format, font, and color.
Show ticksRender tick marks on the axis. Configure color.
Show lineRender the axis baseline. Configure color.
Show split linesRender vertical grid lines across the chart for each tick.

Use the master toggle to show or hide the legend entirely.

SettingDescription
PositionLegend placement: Top, Bottom, Left, or Right.
Show valuesStatistics displayed per series: Min, Max, Average, Total, Latest.
LabelFont and color for series name labels.
ValueFont and color for statistic values.
Column titleFont and color for the column header row (visible when Show values is enabled).
Sort datakeys in legendSort series entries alphabetically.

Use the master toggle to show or hide the tooltip entirely.

SettingDescription
TriggerPoint — hover over a data point; Axis — hover anywhere shows values for all series at that timestamp.
DateToggle to show the timestamp. Select the date format and configure font and color.
Show date time intervalDisplay the time interval range in the tooltip header.
Hide zero valuesSuppress series entries with a value of zero from the tooltip.
LabelFont and color for series name labels in the tooltip.
ValueFont and color for value text in the tooltip.
Background colorTooltip background fill color.
Background blurBlur radius (px) applied to the tooltip background.

Use the master toggle to enable or disable chart animation. When enabled:

SettingDescription
Animation thresholdIf the number of data points exceeds this value (default 2000), animation is disabled to maintain performance.
Animation durationDuration of the initial load animation in milliseconds (default 500 ms).
Animation easingEasing function for the initial animation, like cubicOut.
Animation delayDelay before the initial animation starts, in milliseconds.
Update animation durationDuration of the animation when data updates arrive (default 300 ms).
Update animation easingEasing function for update animations.
Update animation delayDelay before update animations start, in milliseconds.
SettingDescription
BackgroundSolid color or image background for the card.
Show card buttonsEnable Fullscreen and Data export toolbar buttons.
Card border radiusCorner rounding in pixels.
Card paddingSpacing between content and card border.

The State chart supports the Widget header button action — a button placed in the widget header that triggers a configured action when clicked.

Goal: Display a timeline showing when a Smart Device was connected and when it lost connection over the last day, using a boolean connected telemetry key.

Prerequisites: A device named Smart Device that sends a connected key with boolean values (true / false).

Step 1. Add the widget. Open your dashboard in edit mode, click Add widget, select the Charts bundle, then choose State chart.

Step 2. Configure the time window. Set Period to last 1 day. Leave Aggregation set to None.

Step 3. Configure the datasource. Set Datasource type to Device, then select Smart Device.

Step 4. Add a series. In the Series section, add one data key:

KeyLabelY axisColorDecimals
connectedDevice statedefault#2196F30

Open the series advanced settings and set Fill to Gradient, with start opacity 80 and end opacity 40.

Step 5. Configure states. In the States section, add two states:

LabelTicks valueSourceValue typeValue
Inactive0ConstantBooleanFalse
Active1ConstantBooleanTrue

Step 6. Configure Y axes. Set the default axis:

IDLabelPositionMinMaxDecimals
defaultDevice stateLeft010

Step 7. Configure appearance. Disable the Title display. In the Legend section, disable the legend.

Step 8. Save. Click Add, resize and reposition as needed, then click Save on the dashboard toolbar.

Result: The chart shows a timeline of blue segments representing periods when the device was active (connected = true). Gaps in the segments indicate inactive periods. The Y axis labels show Inactive and Active instead of raw 0/1 values.

Widget shows no data

CauseSolution
Wrong data key nameConfirm the key name matches the telemetry key sent by the device. Key names are case-sensitive.
Incorrect datasource or entity aliasVerify the correct Device or Entity alias is selected. Open Entity aliases to confirm the alias resolves to results.
Device not sending dataOpen Devices → Latest telemetry and check for recent values. If empty, verify the device transport configuration and access token.
No telemetry in the selected time windowExtend the time range to confirm data exists.
Rule chain misconfigurationCheck that the Rule Chain has a Save time series node routing device telemetry to the database.
Datasource updated after importAfter importing a widget, update the datasource to point to your device and update the data key name to match your device’s actual telemetry.

State labels do not appear on the Y axis

CauseSolution
States not configuredOpen the States section and verify that each expected state value has an entry with the correct Value type and Value.
Y axis Min/Max not setSet Min and Max explicitly to cover the full range of your ticks values — for example, 0 to 1 for a boolean key.
Value type mismatchEnsure the Value type in the States section matches the actual data type of the telemetry key (Boolean, String, Integer, etc.).

Chart shows a flat line instead of state segments

CauseSolution
Aggregation enabledSet Aggregation to None in the time window to show individual state transitions instead of averages.
Ticks values not distinctEnsure each state has a unique Ticks value so the Y axis can separate them visually.