Skip to content
Stand with Ukraine flag

Status Ranking

  • Widget
  • 12 installs
  • v1.0.0
  • Sep 10, 2026
  • MIT license
  • v4.2+
Status Ranking

Ranks the string values reported by one or more time series keys by how often they occur in the selected time window, and draws each one as a horizontal bar. Built for fault and status codes: values such as OK are excluded from the count so a healthy state cannot win the ranking. Several data keys can be merged into a single ranking of values, or ranked against each other one row per key. Rows can be limited, reordered, shown as counts or shares, and coloured per data key or by occurrence count.

Widget Type
  • Timeseries
Category
  • Charts & Graphs
Use Cases
  • Environment Monitoring
  • Industrial Automation
  • Predictive Maintenance

Who it’s for

Maintenance and operations engineers watching a machine, line or fleet dashboard, asking “which fault dominated this shift?”. Their devices report status and fault codes as strings — Low air pressure, PR door open, OK — and no numeric chart answers that question: a line chart of text values draws nothing, and a table of raw readings makes the operator count rows by hand.

What it does

A press that reported Wire selector fault four times and PR door open once over the window shows two bars, the first four times longer, each labelled with the value and its count — and no bar at all for the hundreds of OK readings in between.

  • Counts how often each distinct string value occurs in the dashboard time window and ranks the values against each other
  • Values on an ignore list — ok, none by default — are dropped before counting, so a healthy state cannot win its own fault ranking
  • Bar length is relative to the top row, so the shape of the ranking stays readable even when every value is rare
  • Summary line with the number of counted readings and the number of distinct statuses
  • Each row can show occurrences, the share of all counted readings, or both
  • Several data keys can be merged into a single ranking of values, or ranked against each other one row per key
  • The list scrolls, and the widget tightens its spacing and type scale on cards narrower than 240 px
  • Counts readings, not duration — it answers which status was reported most often, not which status the machine spent the most time in
  • Ranks values within a window; it does not plot how the ranking itself moved over time

How to set up

Data keys

KeyRoleTypeDescription
Any status or fault key, user-configured (e.g. status, fault, errorCode)Ranked valuesTimeseriesThe reported value, as a string. Values are grouped by their exact text, trimmed of surrounding spaces. Numeric readings are accepted and treated as labels rather than measurements

One key is enough. Any number of keys and datasources can be added — the When several data keys are selected setting decides whether they merge into one ranking of values or become one row each.

Two things to get right:

  • Aggregation must be None. These are string values; every other aggregation function tries to reduce them numerically and the widget will see nothing usable. The default configuration ships with aggregation set to None — if you change the time window, keep it that way.
  • A key that never reported contributes nothing. The widget shows its no-data message rather than an error, so an offline device looks empty rather than broken. It also does not credit silence to the last known value: a device that stopped reporting keeps its old faults only for as long as they fall inside the window.

How to customize

  • To stop a healthy state from taking over the ranking — add its value to Values that are not counted, comma separated, e.g. ok, none, no fault. Letter case and surrounding spaces are ignored.
  • To show more or fewer rows — change Maximum number of rows; 0 draws every row and relies on scrolling.
  • To find the rarest faults instead of the most common — set Order rows by to Least frequent first.
  • To merge spelling variants — turn on Ignore letter case when grouping values, and ALARM, Alarm and alarm become one row.
  • To compare devices or channels instead of values — set When several data keys are selected to Rank the data keys themselves. Each row then counts one key’s readings, prefixed with the entity name when more than one datasource is configured.
  • To show how much of the total each fault accounts for — set Show next to each row to Share of all counted readings or Occurrences and share.
  • To use one colour for every bar — set Bar colour to One colour for every bar and pick it under Colour; leave it on Colour of the data key to inherit the key’s own colour.
  • To highlight the busiest statuses — switch Colour to range mode; ranges are compared against the row’s number of occurrences, so anything over, say, 20 can be red.
  • To fit a denser card — reduce Bar height and Label font, or turn off Show the summary line.
  • To match your dashboard — set Label font, Label colour, Value font, Value colour and Bar background.

Title, icon, card background, corner radius, padding and the no-data message come from the widget’s own Appearance settings rather than being duplicated here — the widget reads noDataDisplayMessage from them.

Tips

  • With Rank the data keys themselves and one key per device, the widget becomes a “noisiest device” board for a whole line — the same ranking, one level up.
  • Range colouring compares against the occurrence count, not the value, so a single colour rule like “red above 20” turns the widget into a threshold view without touching the ignore list.
  • Keep the ignore list to genuinely healthy states. Excluding a real fault hides it from Total and from every share, which makes the remaining percentages hard to reconcile with the raw data.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.