Skip to content
Stand with Ukraine flag

Time series chart

  • Widget
  • v1.0.0
  • Sep 1, 2026
  • MIT license
  • v4.2+ | Built-in
Time series chart

Displays changes to time series data over time—for example, temperature or humidity readings.

Widget Type
  • Timeseries
Category
  • Charts & Graphs
Use Cases
  • Environment Monitoring
  • Industrial Automation
  • Smart Metering

Who it’s for

Engineers who need one chart to carry a whole story — a temperature line against a bar chart of runtime, both against their own axes, with the alarm threshold drawn in and last week overlaid for comparison. This is the general-purpose chart the more opinionated ones are presets of, and it is the right choice as soon as a single series type stops being enough.

What it does

The Time series chart plots any number of series over time, with the drawing style chosen per series. A First key set to a line and a Second key set to bars render on the same time axis, each optionally bound to its own Y axis, with threshold lines drawn across and a previous-period overlay behind them.

  • The series type is per key — line, bar or points on one chart, which is what separates a rate from a total that the rate is supposed to explain.
  • Several Y axes, each with its own units, decimals, label, position and scale, so a percentage and a kilowatt figure share a chart without one flattening the other.
  • Threshold lines mark the limits that matter, so a reader sees the excursion rather than comparing the trace against a number they have to remember.
  • A comparison overlay draws the previous interval, or the same window a day, week, month or year ago, which turns “is this high” into a question the chart answers.
  • Stack mode piles series with the same unit on top of each other, for reading a total and its composition at once.
  • Data zoom lets a reader select a period on the chart without disturbing the dashboard’s time window.
  • The Time series chart is a plotting surface, not a report: it prints no per-bar figures, which is what the Bar chart with labels adds.

How to set up

Data keys

The Time series chart takes one series per data key, from one or more datasources.

KeyRoleTypeDescription
FirstOne plotted seriesTimeseriesTimeseries only — the chart plots history. Each key’s own settings choose its type (line, bar or points), its line and fill styling, and which Y axis it belongs to.

Assign each key a Y axis before styling anything. Keys left on the default axis share one scale, which is correct only when they share a unit; a second axis is what keeps a % series readable beside a kWh one.

Axes and thresholds

SettingDefaultEffect
Y axesOne default axis, left, 0 decimalsEach axis carries its own units, decimals, label, position and min/max
ThresholdsNoneHorizontal reference lines, from a constant, an attribute or a key
X axisAutoTime axis labels, ticks and formatting
Stack modeOffStacks series that share a unit
ComparisonOffOverlays a previous period — previous interval, or a day, week, month or year ago

The chart follows the dashboard’s time window and aggregation, so the same configuration serves a live hour and a historical month.

How to customize

  • To draw a series differently — set that key’s type to line, bar or points, then its line width, step, smoothing and fill.
  • To stop one series flattening another — add a Y axis, give it the second series’ units, and assign the key to it.
  • To mark a limit — add a Threshold; it can take a constant, an entity attribute or another key, so the line moves when the limit does.
  • To compare against a previous period — turn on Comparison and choose the interval, or set a custom one.
  • To read a total and its parts at once — turn on Stack mode, which requires the stacked series to share a unit.
  • To let readers inspect a period — leave Data zoom on.
  • To change what the tooltip reports — set its Trigger to Point or Axis, and configure date, interval, zero-value hiding and, in stack mode, the total.
  • To format tooltip values yourself — supply a Tooltip value format function.
  • To move or drop the legend — set the legend position and configuration, and style its label, value and column title text.

Tips

  • Put thresholds on the chart rather than in the reader’s head. A limit drawn as a line turns every glance into a comparison; a limit that lives in a runbook gets checked only by people who already suspect a problem.
  • Turn on comparison for anything seasonal before concluding a trend is real. Consumption charts in particular look alarming until last year’s line appears behind them showing the same shape.

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.