Skip to main content

AML Dashboard

Knowledge Checkpoint

A grasp of these concepts will help you understand this documentation better:

A dashboard is defined using the Dashboard AML object. It's declared in a .page.aml file (e.g. dashboard_name.page.aml) and brings together five things:

  • Metadata
  • A collection of blocks
  • Block interactions
  • A layout view
  • Settings
Dashboard my_dashboard {
title: 'My Dashboard'
description: ''

block ...
explicit_interactions: [ ... ]
view: CanvasLayout { ... } // or: TabLayout { ... } / HTMLLayout { ... }
settings { ... }
}

Parameters

Tips: Hover over any text to see supported parameters in the tooltip.

hover-to-see-supported-paramters

Parameter nameDescription
titleUser-friendly name for the dashboard shown in Reporting layer
descriptionDescription of the dashboard. Supports Markdown formatting.
ownerWho's in charge of managing the dashboard
blockBlocks that make up the dashboard. See AML Dashboard Blocks
explicit_interactionsHow blocks interact with each other. See AML Dashboard Interactions
viewDashboard layout. Accepts CanvasLayout, TabLayout, or HTMLLayout
settingsDashboard-level settings. See settings
themeTheme applied to the dashboard. Accepts a static theme, or a separate theme per light/dark mode. See Apply a theme and AML Theme and Colors

settings

The settings block controls dashboard-level behavior: when it runs queries, how long results are cached, and the default timezone.

ParameterDescriptionAccepted values
timezoneDefault timezone used to display dates and times on the dashboard. See Dashboard timezoneAny IANA timezone name, e.g. 'America/Los_Angeles'
allow_timezone_changeWhether viewers can override the dashboard's timezone at view timeBoolean
autorun_on_openWhether the dashboard runs all widgets automatically when opened. See Auto-run on openBoolean, default true
autorun_on_changesWhether the dashboard re-runs automatically when a viewer changes a filter or control, without clicking Apply. See Auto-run on changesBoolean, default false
cache_durationHow long, in minutes, query results are cached before the dashboard re-runs them. See Data cachingNumber
settings {
timezone: 'America/Los_Angeles'
allow_timezone_change: true
autorun_on_open: false
autorun_on_changes: true
cache_duration: 360
}

Example

my_dashboard.page.aml
Dashboard myDashboard {

// metadata
title: 'My Dashboard'
description: ''''''
theme: my_custom_theme

// collection of blocks
block t1: TextBlock {
content: @md # Hello World!;;
}
block v1: VizBlock {
label: 'GMV Over Time'
viz: CombinationChart {
dataset: demo_ecommerce
...
settings {
row_limit: 5000
legend_label: 'top'
}
}
}
block v2: VizBlock {
label: 'Order Details'
viz: DataTable {
dataset: demo_ecommerce
fields: [
...
]
settings {
row_limit: 5000
}
}
}
block f1: FilterBlock {
label: 'Order Created At'
type: 'field'
source: FieldFilterSource {
dataset: demo_ecommerce
field: r(order_master.order_created_at)
}
default {
operator: 'matches'
value: 'last 2 years'
}
}
block d1: DateDrillBlock {
label: 'Drill by'
default: 'month'
}

// interactions
explicit_interactions: [
DateDrillInteraction {
from: 'd1'
to: ['v1']
field: r(order_master.order_created_at)
}
]

// settings
settings {
timezone: 'America/Los_Angeles'
cache_duration: 360
}

// view
view: CanvasLayout {
label: 'View 1'
width: 1080
height: 620
block t1 {
position: pos(30, 30, 250, 60)
}
block v1 {
position: pos(300, 30, 760, 250)
}
block v2 {
position: pos(300, 300, 760, 300)
}
block f1 {
position: pos(30, 190, 250, 80)
}
block d1 {
position: pos(30, 100, 250, 80)
}
}
}

Output:

aml-dashboard

See also


Open Markdown
Let us know what you think about this document :)