List of tiles

The tiles represent the building blocks of Envision’s dashboards. Below, we list all the tiles supported by Envision.

Assert tile

This tile is intended to purposefully mark a run as failed if certain conditions are not met with the data. A list of conditions can be listed after the with keyword.

show assert "My flags" with
  count(Id) > 20 as "More than 20 items found"
  sum(Orders.1) > 20 as "More than 20 orders found"

Barchart tile

This tile is intended to display a barchart. The expression passed after the with keyword should offer an aggregator. An explicit group by statement is expected.

show barchart "Stock per Brand" unit: "$" with
  sum(StockOnHand * PurchasePrice)
  group by Brand

The options available at the tile level are:

No column options are allowed.

Form tile

This tile is intended to display a form where values can be manually entered from the dashboard view. The variables listed for display in this tile are expected to be attached to the virtual Form table. Variables defined in forms are always scalars and their type should be explicitly declared.

expect Form.Coef : number
expect Form.IsTicked : boolean
show form "My settings" with
  Form.Coef as "Coefficient"
  Form.IsTicked as "Check this case to modify the coefficient"

As a rule of thumb, we suggest to assign a height (number of grid lines covered) equal to N+1, where N is the number of input Form variables listed after the with.

Histogram tile

This tile is intended to display an histogram. Unlike the barchart, the bars of the histogram are vertical. The histogram tile expects only a single numeric vector to be provided as an argument.

show histogram "Quantities ordered" with

Also, the histogram tile can be used to display a scalar distribution:

show histogram "Poisson Law" with poisson(3)

If you have produced a probabilistic demand forecast, a single item needs to be selected. This can be achieved with:

where Id == "123"
  show histogram "My Forecast" with same(Demand)

At the tile level, the available options are:

There are options at the column level.

Label tile

This tile is purely intended to display a piece of text within the dashboard. This is the simplest tile that takes no input data.

show label "Hello World"

Linechart tile

This tile is intended to display time-series. Linechart tile takes date-indexed data as input. Multiple expressions can be passed as an argument after the with keyword.

Week.sold := sum(Orders.NetAmount)
show linechart "Week sold/purchased" unit: "$" with
  Week.sold as "Sold" color: "red"
  sum(PO.NetAmount) color: "blue"

While the color can be defined at the tile-level - just like any other tile - it is also possible to specify the color of each line to be plotted, as illustrated above.

At the tile level, the available options are:

At the column level, the following options are available:

Line chart also supports group by SomeDate. To see how group by SomeDate can be used in practice, refer to dashboard slicing.

Logo tile

This tile is intended to display a company logo. The tile displays the image file logo.png or logo.jpg that should be located at the root of your Lokad account. If you haven’t uploaded such a logo file yet, the tile will propose to upload the image file. The recommended dimensions for the logo are 150x70px (one column wide) or 310x70px (two columns wide).

show logo "My Company"

Markdown tile

This tile is intended to display contextual documentation formatted in Markdown, a very simply markup language that can help you produce a readable document online.

show markdown "My title" a6h6 with """
# Part A
## Subpart A.1
A list of **important** remarks.

* remark 1
* remark 2
* remark 3

## Subpart A.2
# Part B

Less important remarks.

We recommend leaving the title empty, as the tile title is usually redundant with the title defined within the Markdown section itself, as illustrated by:

show markdown "" with """ ... """

Piechart tile

This tile is intended to display a piechart. The expression passed after the with keyword should offer an aggregator. An explicit group by statement is expected.

show piechart "Stock per Brand" unit: "$" with
  sum(StockOnHand * PurchasePrice)
  group by Brand

Plot tile

The tile is intended to display a function f(x)=y.

show plot "My function" with T.X, T.Y

The tile-level options that are available are:

Summary tile

This tile is intended to gather multiple scalar values, typically KPIs. Each value can be associated to a label and a unit.

show summary "Key stock figures" a1b2 with
  sum(StockOnHand) as "Units on hand"
  sum(StockOnOrder) as "Units on order"
  sum(Stock * BuyPrice) as "Stock value" unit: "$"

Table tile

The table is the most versatile tile offered by Envision. This tile is intended to display a table, and this table can optionally be exported as a flat file.

show table "Top sellers" export:"/tops.tsv" with
  Supplier as "Supplier Name"
  Category as "Category"
  sum(Orders.NetAmount) as "Sold" unit:"$"
  group by [Supplier, Category]
  order by sum(Orders.NetAmount) desc

The table tile supports both the group by and order by aggregation options. In both cases, a tuple can be provided instead of a single value.

Tile-level options

The table tile supports multiple options defined at the tile-level. Those options are specified after the title, as illustrated by:

show table "options" color: "red" unit: "$" with 123

The list of options available are:

Moreover, Envision provides the possibility of specifying the color as a named runtime option. In the following example, the color of the tile changes depending on the present day (black on Monday, and red for all the other days):

isMonday := today() mod 7 == 0
myColor := isMonday ? "black" : "red"
show label "Monday is Black" color: myColor

Column-level options

Each column can benefit from options on its own. This syntax is illustrated by:

show table "Some column-level options" with
  Id as "Produce ID"
  StockOnHand as "On Hand" unit: "ea"
  BuyPrice unit: "$"

The list of options at the column level are:

Date format strings

The format string for dates is a mini-syntax that lets you specify how the dates should be formatted in the table tile. For example:

show table "Last sold"  date: "yyyy-MM-dd" with

The available tokens are:

Any other characters are used as in the output string.

Number format strings

The format string for numbers is a mini-syntax that allows you to specify how the numbers should be formatted in the table tile. For example:

show table "Total sold" number:"1,000.00" with

The syntax imitates the actual desired output for the numbers:

Single value display

When a table tile contains only a single column and a single line, the table display is adjusted to reflect a single value display.

show table "Total Stock Value" with
  sum(StockOnHand * BuyPrice)

Upload tile

The upload tile is intended to facilitate the upload of typically smaller files directly from an Envision dashboard, without navigating back and forth to the Files area in your Lokad account. When considering complex simulators that involve many parameters, it is often simpler to have all those parameters gathered in a spreadsheet, as opposed to entering all those values within a web page. While it is possible to upload such a spreadsheet like any other file in your Lokad account, it is more practical if the upload can happen directly within the dashboard. The upload tile is precisely intended to support this use case.

read upload as MySuppliers[*] with 
  SupplierId : text
  SupplierQuota : number
  SupplierCountry : text

show upload "Supplier settings" with MySuppliers.*

Unlike other tiles, the upload tile is tightly coupled with a corresponding read upload statement. Indeed, the syntax offers a way to treat the data uploaded by the user, just like any other table also accessible to Envision. The syntax lets you specify the expected format for the table columns to be uploaded within the dashboard. Also, just like any other data inputs, Envision provides a complete versioning of the uploaded files previously processed. The previously uploaded files can be re-downloaded from the History link of the dashboard.

This upload feature is accessible to any user who has access to the dashboard, without requiring the user to have access to the file storage area of your Lokad account. Thus the upload tile is also handy to provide more granular user accesses.