show
The keyword show
displays a tile, a fundamental unit of an Envision dashboard.
‘show’, display a tile
A dashboard produced by Envision is composed of tiles; the show
keyword provides the means for displaying a single tile. The simplest type of a tile is label
:
show label "Hello, World!"
which simply displays a given text.
A slightly more complex tile is scalar
, which displays a given text with a single value:
show scalar "My number" with 123
or:
show scalar "My text" with "hello"
The summary
tile is a more complex tile that displays several values at once (using multi-line syntax):
show summary "Several scalar values" with
123
"hello"
date(2024, 1, 31)
A few other types of tiles that take tabular data are table
, barchart
, and piechart
:
table C = with
[| as Country, as Region, as UnitSold, as InEuros |]
[| "France", "Europe", 100, 10000 |]
[| "Germany", "Europe", 125, 12500 |]
[| "USA", "North America", 1000, 100000 |]
[| "Canada", "North America", 75, 7500 |]
show table "Sales by Region (table)" with
C.Region
sum(C.UnitSold) as "Units"
sum(C.InEuros) as "€"
group by C.Region
show barchart "Sales by Region (barchart)" with
sum(C.InEuros) as "€"
group by C.Region
show piechart "Sales by Region (piechart)" with
sum(C.InEuros) as "€"
group by C.Region
In the show
statements above, with
accepts a list of vectors (columns) to display, each of which is placed on a separate line using the multiline syntax. The show table
statement is displayed as follows:
Region | Units | € |
---|---|---|
Europe | 225 | 22.5k |
North America | 1075 | 107.5k |
The show barchart
statement is displayed as follows:
The show piechart
statement is displayed as follows:
In summary, the show
keyword accepts the following syntactical elements:
- The tile type keyword (such as
scalar
ortable
), which specifies how input data will be rendered. - The tile title, which must be a scalar text value, but not necessarily a text literal.
- The
with
keyword, which introduces the list of input vectors for the tile (required by all tile types exceptlabel
).
See also
Below is the complete list of tile types supported by Envision:
- assert – mark a run as failed if certain conditions are not met with the data.
- barchart – display data in a bar chart.
- chart – display data as a series of internal tiles.
- form – display a form where values can be manually entered from the dashboard view.
- histogram – display data in a histogram.
- label – display a short piece of text within the dashboard.
- linechart – display a daily, weekly and monthly time-series.
- markdown – display Markdown text.
- piechart – display data in a pie chart.
- plot – display a function f(x)=y.
- scalar – display a table with only a single line.
- scatter – display a set of 2D points.
- slicepicker – display an interactive tile with navigation controls.
- slicetree – display an interactive tile with navigation controls and an arbitrary number of hierarchical levels.
- summary – display a list of scalar values (such as KPI).
- table – display data in a tabular format.
- tabs – display a tab selector between two or more tabs.
- treemap – display data table as a two-dimensional map.
- upload – upload files directly from an Envision dashboard.