Canvas Dashboard YAML
In your Rill project directory, create a explore dashboard, <dashboard_name>.yaml
, file in the dashboards
directory. Rill will ingest the dashboard definition next time you run rill start
.
Properties
type
— Refers to the resource type and must be explore
(required).
title
— Refers to the display name for the dashboard [deprecated, use display_name
] (required).
display_name
- Refers to the display name for the metrics view (required).
rows
- Refers to all of the rows displayed on the Canvas dashboard (required).
items
- Refers to each row of components, mulitple items can be listed in a singleitems
. (required).markdown
- text component, uses markdown formatting.kpi_grid
- KPI component, similar to TDD in Rill Explore, display quick KPI charts.stacked_bar_normalized
- Bar chart normalized to 100% values.line_chart
- Normal Line chartbar_chart
- Normal Bar chartstacked_bar
- Stacked Bar chartarea_chart
- Line chart with areaimage
- provide aurl
to embed into canvas dashboardtable
- similar to Pivot table, add dimensions and measures to visual your data
Each component varies slightly on what keys are required. For the most part, each component will require a metrics_view
(except for text and image.) The charts will require a x
and y
valeu To build a successful component via code, take a look at what gets generated in the YAML file when select various features in the visual canvas editor.
- items:
- stacked_bar:
metrics_view: <metrics_view>
title: ""
description: ""
color: hsl(240,100%,67%)
x:
field: <x_field>
limit: 20
sort: -y
type: temporal
y:
field: <y_field>
type: quantitative
zeroBasedOrigin: true
width: 6
- kpi_grid:
metrics_view: <metrics_view>
measures:
- <measure_1>
- <measure_2>
- <measure_3>
comparison:
- delta
- percent_change
width: 12
height: 128px
max_width
: Max width of the Canvas dashboard. Defaults to 1200 (optional).
defaults
- defines the defaults YAML struct
-
time_range
— Refers to the default time range shown when a user initially loads the dashboard. The value must be either a valid ISO 8601 duration (for example,PT12H
for 12 hours,P1M
for 1 month, orP26W
for 26 weeks) or one of the Rill ISO 8601 extensions (default). If not specified, defaults to the full time range of thetimeseries
column (optional). -
comparison_mode
- comparison mode (optional).none
- no comparisontime
- time, will pick the comparison period depending ondefault_time_range
Default Example:
defaults: #define all the defaults within here
time_range: P1M
comparison_mode: time
time_ranges
— Overrides the list of default time range selections available in the dropdown. Note that All Time
and Custom
selections are always available (optional).
range
— a valid ISO 8601 duration or one of the Rill ISO 8601 extensions for the selection (required)comparison_offsets
— list of time comparison options for this time range selection (optional). Must be one of the Rill ISO 8601 extensions.
Example:
time_ranges:
- PT15M // Simplified syntax to specify only the range
- PT1H
- PT6H
- P7D
- range: P5D // Advanced syntax to specify comparison_offsets as well
- P4W
- rill-TD // Today
- rill-WTD // Week-To-date
time_zones
— Refers to the time zones that should be pinned to the top of the time zone selector. It should be a list of IANA time zone identifiers. By adding one or more time zones will make the dashboard time zone aware and allow users to change current time zone within the dashboard (optional).
theme
— Refers to the default theme to apply to the dashboard. A valid theme must be defined in the project. Read this page for more detailed information about themes (optional).
theme:
colors:
primary: hsl(180, 100%, 50%)
secondary: lightgreen
security
- Defines a security policy for the dashboard (optional).
access
- Expression indicating if the user should be granted access to the dashboard. If not defined, it will resolve tofalse
and the dashboard won't be accessible to anyone. Needs to be a valid SQL expression that evaluates to a boolean (optional).