Skip to content

Reference

Runtime attributes

The data-dash roles and every data attribute the Dashies dashboard runtime reads, including the viewer controls and time intelligence.

A published dashboard is one HTML file. The runtime finds every element carrying data-dash, reads the other data-* attributes on it to learn what to render, and resolves each value against the data island.

You get these attributes for free when you publish a spec with tiles. You write them by hand only in look mode, where the markup is yours. Either way the same runtime reads them, and every binding must resolve against a declared dataset or the publish is refused.

Roles

data-dash names what an element is. Seventeen values are recognised.

RoleRendered by the spec tile
metrickpi
chartchart
tabletable
matrixmatrix
heatmapheatmap
scatterscatter
treemaptreemap
waterfallwaterfall
funnelfunnel
drilldowndrilldown
stackedstacked
combocombo
piepie
donutdonut
gaugegauge
filterfilter
updated-atemitted once per dashboard, not by a tile

The kpi tile compiles to data-dash="metric"; that is the only case where the tile type and the role differ in name. The text and custom tiles carry no data-dash at all: one is prose and the other is markup you own.

data-dash="updated-at" marks the span that receives the freshness stamp. It takes no other attributes.

Routing

AttributeValueNotes
data-dataseta dataset nameWhich dataset this tile reads. Emitted on every bound tile when the dashboard declares more than one; with a single dataset it is omitted and the runtime uses that one.

Binding a value

AttributeValueRead by
data-measurea measure keyEvery role that shows a figure.
data-measurescomma-separated measure keyschart, for a multi-series chart: two to four measure keys, one series each, at the same data-x. Draws on every data source, served data included.
data-measure2a measure keycombo, the secondary axis.
data-num, data-denmeasure keysAny role showing a ratio. The ratio is computed under the current filters, never stored.
data-num-scope, data-den-scopeallComputes that side of the ratio over the unfiltered dataset, which is how a share-of-total is expressed.
data-num2, data-den2measure keyscombo, a ratio on the secondary axis.
data-aggan aggregate nameAn override the compiler never emits. It is honoured only where it agrees with the stored measure; a claim the data cannot support renders unavailable.

Naming a dimension

AttributeValueRead by
data-xa dimension keychart, stacked, combo, treemap, waterfall, funnel, pie, donut.
data-rows, data-colsdimension keysmatrix, heatmap.
data-pointa dimension keyscatter, one point per member.
data-levelscomma-separated dimension keysdrilldown, outermost first.
data-seriesa dimension keychart, stacked. On a chart, beside a data-measure, one series per value of the dimension, on every data source, served data included. At most 5 series. A missing value is a series of its own on every dataset, labelled - and drawn last, and counts toward the 5, on a stacked widget as on a chart. Past 5, the chart shows Too many series: <dimension> has N values, max 5. when the page is viewed, rather than drawing some of them.
data-dima dimension keyfilter.

Shape and scale

AttributeValueRead by
data-typebar, hbar, line, areachart, stacked.
data-type2bar, line, areacombo, the secondary series.
data-stacknormal, percentstacked.
data-axis-syncpresentcombo, forces both axes onto one scale.
data-subtotalsboth, row, col, nonematrix, heatmap.
data-colorheat, divergingmatrix, heatmap.
data-min, data-max, data-targetnumbersgauge. These are numeric literals, not measure keys.
data-stagescomma-separated dimension valuesfunnel, in the order the funnel runs.
data-top-n, data-other, data-totala number, then two flagsdrilldown.

How much, and how big

AttributeValueRead by
data-limitan integerMembers rendered before truncation. The ceiling differs per role: see Tile types.
data-sortvalue-desc, value-asc, or <key>:asc / <key>:desc on a tablechart, table. Optional on both: a table with no data-sort orders by its group key, so its rows do not move between refreshes. On a table, <key> has to be a column its rows carry: its data-group on a grouped table, a dimension it lists on an ungrouped one (any dimension when data-columns is absent), or on either any measure that is not a ratio, including one the table does not draw. Publish refuses any other key and a chart's value-desc or value-asc, which the table would ignore without a word, and a direction other than asc or desc, which it would read as desc; each refusal names what the table accepts.
data-columnscolumn keystable. The columns drawn, in the order written. With no data-group, the table rolls up to the dimensions it lists: region,revenue draws one row per region with its total. Every key has to be a dimension or measure the dataset declares, and not a ratio measure: a table cannot draw any other column, even one the dataset's SQL returns, and it cannot draw a ratio either, so publish refuses the page and names the key. A ratio shows on a metric that names its two measures in data-num and data-den, or in your own script, where dashies.data hands it over worked out on every row.
data-groupone dimension keytable. Rolls the rows up by that dimension and draws it first, then the measures data-columns names, in the order written - or every measure of the dataset when there is no data-columns. A second dimension in data-columns beside data-group is refused at publish, since it cannot be drawn without grouping by it too: group by it instead, or drop data-group and list every dimension you want in data-columns. The key itself has to be a dimension the dataset declares: publish refuses any other name, which the table could not group by, and lists the dimensions it can.
data-height120 to 800Every drawn chart role.

Display

AttributeValueNotes
data-labela stringThe visible label, on a filter.
data-formata format nameHow to render the figure, which otherwise draws in what its measure or declared ratio declares. On a widget drawing one figure it overrides that, and the measure's own currency and decimals do not follow it into a different format. On a table, a scatter, or a chart with data-measures, each figure draws in its own measure's format and this fills in only one whose measure declares none. data-format2 is the combo secondary.
data-currencyan ISO 4217 codeFills in a figure whose measure or ratio declares no currency. It never replaces one that does: publish refuses a page where a widget drawing one figure carries a data-currency that contradicts the currency its figure declares, and names that currency. On a table, a scatter, or a chart with data-measures, it fills in only the figures that declare none.
data-decimals0 to 6Overrides the declared decimal places on a widget drawing one figure. On a table, a scatter, or a chart with data-measures, it fills in only a figure that declares none.
data-scalea divisorInert. The compiler emits it on a ratio binding and no runtime fragment reads it, so it changes nothing. It is why a measure declaring scale: cents or scale: points is refused at publish on a tiles spec rather than rendered at 100 times its value. A look body on a cube, rows or resolved dataset keeps the declaration, because its own code formats the value and is handed the divisor beside it; a lattice or hybrid dataset is refused there too, since its data block carries no divisor to hand over, and so is a measure a hand-written data-dash binding in the body draws (a data-group binding with no data-columns draws every measure, per the data-group row).

A lattice or hybrid dataset's data block carries no measure's format, currency or decimal places today, so on one a measure draws as a figure that declares none and the three attributes above fill it in: one data-format covers every measure column of a table there. A declared ratio carries its format on every dataset.

Viewer controls

These are what make a published page interactive without a server. Each is read at view time and changes only what is on screen.

AttributeValueEffect
data-multipresentThe filter becomes a multi-select listbox instead of a single-select.
data-rangepresentThe filter becomes a range selector. A tile may carry data-multi or data-range, never both.
data-controlscontrol namesAdds live sort and limit controls to a chart or table, so a reader can reorder or widen it. A multi-series chart (data-measures or data-series) draws none, and the publish warns when one carries it.
data-xfilterpresentClicking a bar filters the rest of the dashboard by that member.
data-drilla dataset nameClicking the tile opens a modal showing that dataset's detail for the clicked member.
data-tilea tile idThe identity a control or cross-filter addresses. Emitted alongside the two above.
data-widgeta widget idThe id the sort and limit controls of data-controls are keyed by, in the page's state and in a shared link's hash (t:<id>.sort=..., t:<id>.n=...). It is required with data-controls. It is the name a page you write should use; a body published earlier carries the same id as data-tile, which is still read, and when a node carries both, data-widget is the one read.

A multi-select or range filter changes which cells the resolver has to combine, which is why declaring one can change the dataset mode a spec needs. See how mode is resolved.

Time intelligence

Four attributes, on a metric tile only. The compiler does not emit these; they are available in look mode and on hand-written markup.

AttributeValue
data-timeintelthe date dimension key to walk
data-compareyoy, qoq, mom, pop, ytd, running, movavg
data-compare-aspct, delta, prior, current. Defaults to pct. Applies to a shift mode only
data-window2 to 1,000, required by movavg

yoy, qoq and mom shift the anchor period back 12, 3 and 1 months. pop steps to the previous period actually present in the series rather than a calendar guess. ytd and running accumulate up to and including the anchor.

Every one of these resolves at view time out of cells a lattice already precomputed, so the comparison stays correct under whatever filter is applied. A comparison composes two resolutions, so both must be exact: where a prior period is missing, the tile renders unavailable rather than treating the absence as a zero and reporting a confident growth figure.

That means a comparison needs a lattice or hybrid dataset. On a plain cube or a row-level dataset the tile says so and renders nothing.

What a tile cannot do

A published dashboard is served with Content-Security-Policy: sandbox allow-scripts. Scripts run, including a custom tile's js, but the page is placed in an opaque origin. That is not configurable.

CapabilityUnder the sandbox
Script executionallowed, which is what allow-scripts grants
localStorage, sessionStorage, IndexedDB, cookiesdenied, and access throws
Same-origin authenticated fetchdenied, because the origin is opaque
Cross-origin fetchnot restricted

This isolates the page from your Dashies account. It does not confine the page.

There is no connect-src and no default-src in that header, so a cross-origin fetch from a custom tile is not blocked. The product relies on exactly that: the row-level query engine is loaded cross-origin from data.dashies.ai under this same header, and that cross-origin split is what preserves the isolation in the first place.

What the sandbox buys is the thing that matters on a shared origin. A published dashboard is served from a host the Dashies app also uses, so without the opaque origin any markup an author included could read a viewer's session out of localStorage. The sandbox makes that impossible. It is not a promise that the page talks to nothing.

Published dashboards add frame-ancestors 'none' on top of the sandbox, because the only published kind is members-only. An authenticated in-app preview uses frame-ancestors 'self' instead. Those directives constrain who may frame the page, not what the page may read.

The practical consequence for a custom tile is still that it should draw only from the datasets named in its reads, which the runtime hands it directly. Anything it fetches itself is outside the refresh contract: it is not versioned, not seeded, not re-run on the schedule, and not covered by any of the correctness checks on this site.

Check it worked

Open the published dashboard and change a filter. Every bound tile should either update or state a reason it cannot. A tile that renders a stale figure after a filter change is reading something other than the resolver, which for a custom tile means its js is holding its own copy of the numbers.