Skip to main content
Version: 1.0.4

Historian

The full historical trend chart. It loads the time range you configure and then keeps updating as new readings arrive, so one chart answers both "what happened last Tuesday" and "what is happening now".

The Historian component as it renders with its default settings.The Historian component as it renders with its default settings.

Reach for it when you need:

  • The main trend on an analysis or engineering screen
  • Comparing several tags over a selectable time range

Component name: Historian · Category: Chart

In the palette: Time-series chart driven by the historian. Backfills the configured window, then tails live ticks as they arrive.

Properties

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
seriesarray[]Time-series to render. Each entry is one line, plotted against the configured time window.
timeWindowSecnumber300Width of the visible time window (in seconds) in LIVE mode. Drives the initial backfill range = [now - timeWindowSec, now] AND the sliding x-axis extent. Typical presets: 60 (1m), 300 (5m), 900 (15m), 3600 (1h), 21600 (6h), 86400 (1d). Capped at 24h (86400s) — a live trend watches the moving present; for longer spans use Range mode. Ignored in Range mode (the user-picked [start, end] takes over).
aggregateenumavgHow the server aggregates raw historian rows into the SAMPLE BY buckets returned to the chart. avg = single mean line per tag. minmax = avg line + area band between min/max — useful for seeing volatility around the trend (only the backfill region carries the envelope; the live edge collapses to a line). Options: avg · minmax.
maxPointsnumber1000Target number of buckets in the backfill. The server picks the SAMPLE BY bucket size as windowSec / maxPoints (floored at 1s), and hard-caps the result at 10000 rows. Higher = finer detail at cost of bigger payload; 1000–2000 fits a typical viewport at any density. Lower = faster but blockier visualization.
autoScalebooleantrueWhen true, y-axis fits data each update (with hysteresis to avoid sub-pixel jitter). When false, the axis is pinned to whatever range it last settled at — useful for setpoint-driven views where you want a fixed scale across multiple charts.
xAxisobject{"show":true,"showLine":true,"lineColor":"#64748b","showGrid… (truncated)X (time) axis customization. Toggle visibility, show/hide the baseline, gridlines and ticks independently, and set the tick-label font size.
yAxisobject{"show":true,"showLine":true,"lineColor":"#64748b","showGrid… (truncated)Y (value) axis customization — applies to every value axis. Toggle visibility, baseline, gridlines and ticks independently, and set the tick-label font size.
timeWindowPresetsarray[60,300,900,3600,21600,86400]List of preset windows offered in the Live-mode time dropdown, in seconds. Each value renders as one menu option (e.g. 60 → '1m', 3600 → '1h'). Defaults: [60, 300, 900, 3600, 21600, 86400] = 1m, 5m, 15m, 1h, 6h, 24h. Values above 24h (86400s) are dropped — Live mode is capped at a day; use Range mode for longer spans.
exportsobject{"png":true,"csv":true}Toolbar Export dropdown — toggle which formats are exposed. Both default to true. Setting either to false hides that format from the menu (not just disabled). Hide both to suppress the Export button entirely.
settingsobject{"timeFormat":"24h","dateFormat":"dd/MM/yy"}Display preferences. timeFormat affects axis tick labels, the crosshair tooltip, and the PNG export's subtitle. CSV export is always ISO 8601 regardless (locale-independent for downstream tools).
persistConfigbooleantrueRemember this chart's view — selected tags, time range, live window, and display settings — in THIS browser so it survives a page reload without saving the project. Uncheck to always start from the saved config; unchecking also removes whatever this chart already stored in the browser.
aggregationsobject{"avg":true,"min":true,"max":true,"count":true,"sum":false,"… (truncated)Which aggregates appear as columns in the stats table when a date RANGE is selected. avg / min / max / count are on by default; enable sum, stdDev (sample) / stdDevPop (population) standard deviation, variance, range, or first/last as needed. Computed server-side over raw data with QuestDB's built-in aggregate functions.
cursorobject{"lock":{"enabled":true}}Crosshair cursor behavior. Click the chart to PIN the tooltip in place; click again to unpin. Useful for capturing exact values for screenshots or discussion. Disable if it conflicts with the drag-zoom gesture in your workflow.
navigatorobject{"enabled":true,"height":48}Range-mode zoom navigator: a small overview strip under the chart with a draggable window + grips. Drag to zoom the main chart into a sub-window (it re-queries finer data); double-click the chart to reset. Only shown in Range mode. Defaults on.
stylestyle{}Custom CSS properties

Events

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes

Requires history enabled on the tags it plots and a configured historian. If the chart is empty, check those two things before anything else.

Bound the point count. A day of one-second data is 86,400 points per tag; the server aggregates down for you, but only if you ask.

See also