AML DateDrillBlock
DateDrillBlock lets viewers switch the time granularity of mapped visualization blocks without editing the underlying report. It is connected to visualization blocks via a DateDrillInteraction.
Syntax
block <name>: DateDrillBlock {
label: 'Control Label'
default: 'month' // optional
}
Parameters
| Parameter | Description |
|---|---|
label | Display name shown on the control. |
default | Default time granularity on load. Accepted values: 'year', 'quarter', 'month', 'week', 'day'. |
Connecting to visualization blocks
A DateDrillBlock alone does nothing. It must be wired to visualization blocks using a DateDrillInteraction in the dashboard's interactions list. Each CustomMapping specifies which block responds and which date field gets transformed.
Dashboard sales {
block d1: DateDrillBlock {
label: 'Drill by'
default: 'month'
}
block v1: VizBlock {
label: 'Revenue Over Time'
viz: LineChart {
dataset: ecommerce
}
}
interactions: [
DateDrillInteraction {
from: 'd1'
to: [
CustomMapping {
block: 'v1'
field: r(orders.created_at)
}
]
}
]
}
See also
- AML Dashboard: full dashboard syntax
- Date Drill Controls: how date drill works in the UI