Menu

Graphing

You don't build charts on OhioIoT. You publish data in the right shape, and the chart builds itself.

There is no "create a graph" button. The shape of your topic is the chart specification. Publish to numb/temperature/celsius and a graph named temperature appears with a line named celsius on it — automatically, the first time the platform sees it.

The topic is the chart

A graphable publish has five segments. The first two route the message; the last three describe the chart:

username / deviceID / type / graphName / seriesName
   larry / a8f3k2m1 / numb / temperature / celsius   ->  72.5

The type tells the platform how to plot it. The graphName is the chart's title. The seriesName is one line on that chart. Send a value and the chart, the axis, and the line all come into existence on their own — no configuration, no schema, no registration step.

Number graphs and boolean graphs

The type segment picks the kind of graph you get:

TypeGraphBehavior
numbLine chart, numeric Y axis.Aggregated over time before storage — see the retention tiers below.
boolStep chart, on/off states.Forwarded immediately, no aggregation — every transition is preserved.

For the full list of payload types and what each one does, see Data Types & Routing.

Multiple lines on one graph

Reuse a graph name with different series names and the lines land on the same chart:

// two lines on the "temperature" graph
mqtt.publish("~/~/numb/temperature/indoor",  72.5);
mqtt.publish("~/~/numb/temperature/outdoor", 58.3);

Each distinct series name is its own line, colored automatically. There is no limit you need to declare ahead of time — add a new series name and a new line appears.

History and retention tiers

Number data is rolled up into time buckets as it ages, so a chart can show the last few minutes or the last few years without dragging every raw point around. The platform keeps six tiers — minutes, hours, days, weeks, months, years — and holds up to the 3,000 most recent points in each. When you zoom the dashboard chart out, it reads from a coarser tier; when you zoom in, a finer one.

The same tiered history is available over HTTP through the Data API, so you can pull the exact series the dashboard plots into your own app or notebook.

Sending more in one message

The five-segment form sends one value per publish, which is the clearest place to start. When you need to send several readings at once — a sleepy battery device, a high-frequency publisher — you can move structure out of the topic and into a JSON payload. The graphs come out identical. See Topic Flexibility for the five shapes the same data point can take.