The usual way to build a dashboard in Plainly is with a Web page template:
Widgets display list variables, usually from [[INCLUDE=data]]:
[[INCLUDE=widget(type:{widget_type},{option}:{value},...)]]
| Widget | Shows |
|---|---|
| table | Rows of data, with search, paging and optional totals |
| summary_table | Values grouped by one column, with a count, sum, average, minimum or maximum for each group |
| score | A single headline figure, optionally compared with another |
[[INCLUDE=widget(type:table,columns:deals_name|deals_value|deals_stage,column_headings:Client|Value|Stage,sum_on:deals_value,rpp:25)]] [[INCLUDE=widget(type:summary_table,columns:deals_stage|deals_value,column_headings:Stage|Total value,show:sum)]] [[INCLUDE=widget(type:score,columns:deals_value,show:sum,decimals:0,title:Pipeline value)]]
Separate several values in one option with |. Escape a literal comma in an option as ,::ok. See the Widget reference for every option.
To build a dashboard for a user, produce three things: the dataset definition (which workflows or templates, column names), the Web page template text using [[INCLUDE=data(prefix:x_):URL]] and widgets whose columns use the same x_ prefix, and instructions to create a document from the template and register it as a dashboard. Leave {dataset_id} and {dataset_key} as placeholders for the user to fill in.