Dashboards, language
Dashboards are produced directly by Envision scripts. Each show statement emits a tile, and the set of tiles forms the dashboard. This page summarizes the language-level concepts behind that output.
Table of contents
Tiles are typed outputs
Every tile has a type (table, scalar, linechart, and so on). The type determines how the input vectors are interpreted and displayed. The script author chooses the tile type, which makes the output explicit and predictable. See show for the syntax and the full tile list.
Common table alignment
The expressions listed in a show block are aligned on a common table. This alignment defines the data grain for the tile and forces any aggregation to be explicit. Grouping and ordering are therefore part of the language, not a UI action.
table Sales = with
[| as Sku, as Qty, as Price |]
[| "A-01", 2, 5.0 |]
[| "B-02", 1, 7.0 |]
[| "B-02", 4, 7.0 |]
Sales.Amount = Sales.Qty * Sales.Price
show scalar "Total revenue" with sum(Sales.Amount) { unit: "$" }
show table "Revenue by sku" with
Sales.Sku
sum(Sales.Amount) as "Revenue"
group by Sales.Sku
order by sum(Sales.Amount) desc
Grouping and ordering are explicit
group by requires aggregators for each displayed expression. order by accepts multiple keys and can use desc. These operators are part of the Envision language and appear inside the script, not as external dashboard controls. See show for details.
Tile choice conveys intent
Tables emphasize traceability. Scalars and summaries emphasize totals. Charts emphasize shape. Linecharts are calendar-driven time series (see linechart). This choice is made in the script itself, which keeps the output aligned with the logic that produced it.
keep span date = [date(2024, 1, 1) .. date(2024, 1, 21)]
Day.Demand = random.poisson(20 into Day)
Week.Demand = sum(Day.Demand)
show linechart "Daily demand" with
Day.Demand
show linechart "Weekly demand" with
Week.Demand