rebase.energy
Dashboards

The document

Every field of a dashboard document, from the window and the grid to groups, charts, axes, series, and templates.

This page is the field-by-field reference for the document that POST /dashboards and PUT /dashboards/{id} accept and GET /dashboards/schema describes. Unknown fields anywhere are a 422. Every string length below is a maximum.

Top level

FieldTypeDefaultNotes
namestring 1..200requiredunique per workspace (409)
descriptionstring 2000nullshown in the list and the definition, not on the page
layout.columnsint 1..1212the grid; 12 is also the maximum
windowWindownullthe range the page opens with; null = the last 7 days
componentslist, up to 50[]chart and group components

A top-level chart must pass the standalone checks. A group is checked as a whole.

Window

Either absolute or relative, never mixed; at least one field.

FieldTypeNotes
start, enddatetimeabsolute bounds; start before end
lastISO 8601 durationhow far back from now: P7D, PT12H, P1DT6H, P2W
aheadISO 8601 durationhow far forward from now; last without ahead ends at now

Durations accept weeks, days, hours, minutes, and seconds (P2W, P7D, PT12H, PT30M, PT45S, combined as in P1DT6H); anything else is a 422. The page's range picker overrides the window for the viewer and shows relative ranges as now-2d to now+2d.

Group

FieldTypeDefaultNotes
type"group"required
titlestring 200nullthe section heading on the page
descriptionstring 1000null
for_eachForEachrequiredthe iterator
componentchart componentrequiredthe chart every item is drawn from

for_each names exactly one source:

FieldTypeNotes
objecttype slugevery record of that object type, by name. Custom and built-in types; a type whose records sit between two records cannot be iterated
filter{"<attribute>": ["value", ...]}with object only, custom types only: the list route's filter[<attribute>]
recordslist of uuid, 1..200these records, in this order; unknown ids are warnings
limitint 1..20050

Object types named here must exist (422 on write). Records are checked at resolve time and become warnings, not errors.

Chart

FieldTypeDefaultNotes
type"chart"required
titlestring 200nulla template inside a group ({{ item.name }})
descriptionstring 1000nullshown under the title on the card
widthint 1..126grid columns
heightint 1..41rows of about 160 px of plot
chartchart specrequired

Standalone checks, applied to a chart outside a group: every series names a record, and no template refers to item (in the title, a series' record or label, or an axis bound). Both failures are a 422 naming the component index.

Chart spec (chart.chart)

FieldTypeDefaultNotes
kindline, area, barlinethe default drawing kind; a series may override
stackedboolfalsestacks the series drawn on each axis on top of each other; the web app stacks bars and areas as separate stacks
aggregation"auto" or int seconds"auto"auto: about 2,000 points per line; a number: a fixed bucket, up to one year
axesmap of key to axis{}named y axes; left and right exist on the first pane without being declared
paneslist of up to 4 {"height": n}nullrelative heights, top to bottom; omitted = equal
now_lineboolfalsea dashed vertical line at the current time
serieslist 1..50required

Axis keys match ^[a-z][a-z0-9_-]*$, at most 32 characters. Declaring left or right sets their options. Rules: every series' axis must be declared or implicit; at most one axis per side per pane; when panes is given it must cover the highest pane an axis sits on. The pane count is the length of panes when given, else the highest pane used plus one.

Axis

FieldTypeDefaultNotes
paneint 0..30panes stack top to bottom and share the time axis
sideleft, rightleft
labelstring 40nulldefaults to the unit of the series drawn on it
min, maxnumber, or template stringnulla template must contain a placeholder; it renders per item and is evaluated as arithmetic
zero_atnumber, 0 up to but excluding 1nullfraction of the axis height where zero sits; bounds derive from the data
align_zeroaxis keynullshare another axis's zero line (same pane, target not itself aligned)

zero_at and align_zero exclude each other and exclude min. max may be combined with either and then pins the top while the bottom follows. The renderer rounds derived bounds to tidy numbers, keeps the exact ratio, and hides labels below zero on an aligned axis whose data never goes negative.

Two ways to place zero instead of fixing bounds: zero_at: 0.3 keeps negative losses to the bottom 30% of the axis, and align_zero: "power" makes a wind speed on the right read against the power forecast's zero line. The tutorial puts both to work.

Series

FieldTypeDefaultNotes
timeseriesstring 1..100requiredthe series type slug on the record
columnstring 100nullone column of a multi-column type; omitted = every column, each its own line
recorduuid or template, 200nullinside a group it defaults to the iterated record
labelstring 200nulltemplate; sees item and record
color#rgb or #rrggbbpalette
kindline, area, barchart's kindper-series override (bars under a line)
stepboolfalsestepped line
dashsolid, dashed, dottedsolid
axisaxis keyleft
scalenumber, not 01multiplies values: -1 draws losses as negative bars, 0.001 turns kW into MW

Default label: the record name when the chart compares several records, the column (or type) when it compares one record's series, both when it does both. Default colours come from a six-colour palette in series order; a series that reads a whole multi-column type gets one palette colour per column.

Templates

Placeholders are {{ path }}; spaces inside the braces are allowed.

PathAvailable inValue
item.id, item.name, item.objectchart title, series record, series label, axis min/max, inside a groupthe iterated record
item.values.<attribute>samethe record's values as the API shows them (custom attributes; latitude, longitude, description for sites)
item.stats.total_capacity_kwsame, sites onlythe sum of the site's assets' capacity
record.id, record.name, record.objectseries labelthe series' own record, which is item unless the series names a different record

An unknown path renders as the empty string and is reported in the card's errors. Axis bounds are evaluated after rendering as plain arithmetic: numbers with +, -, *, /, and parentheses only. Anything else is reported on the card and the axis falls back to auto-fitting. A template in a chart outside a group is a 422.

Limits

LimitValueOn breach
components per document50422
series per declared chart50422
items per iterator200 (default 50)warning, rest dropped
cards after expansion200warning, rest dropped
lines per dashboard10,000422 at resolve
panes4422

On this page