AML Dashboard Interactions
The interactions list in a dashboard wires control blocks to visualization blocks. When a viewer interacts with a control (e.g. a DateDrillBlock), Holistics applies the change to all mapped visualization blocks.
Dashboard my_dashboard {
// ... blocks ...
interactions: [
DateDrillInteraction { ... }
]
}
Currently, DateDrillInteraction is the interaction type configurable in AML. Other interactions (cross-filtering, drill-through, drill-down) are configured through the dashboard UI, not AML.
DateDrillInteraction
DateDrillInteraction connects a DateDrillBlock to one or more visualization blocks, mapping a date field in each target block to the viewer-selected time granularity.
| Parameter | Description |
|---|---|
from | Name of the DateDrillBlock that drives this interaction. |
to | List of CustomMapping objects, one per target visualization block. |
CustomMapping
Each CustomMapping entry specifies a target block and which date field in that block should be transformed.
| Parameter | Description |
|---|---|
block | Name of the target VizBlock (as a string). |
field | Reference to the date field to transform, using r(model.field) syntax. |
Example
Dashboard sales {
block d1: DateDrillBlock {
label: 'Drill by'
default: 'month'
}
block v1: VizBlock {
label: 'Revenue Over Time'
viz: LineChart { dataset: ecommerce }
}
block v2: VizBlock {
label: 'Orders Over Time'
viz: BarChart { dataset: ecommerce }
}
interactions: [
DateDrillInteraction {
from: 'd1'
to: [
CustomMapping { block: 'v1', field: r(orders.created_at) },
CustomMapping { block: 'v2', field: r(orders.created_at) }
]
}
]
}
Other interaction types
These interactions are configured through the dashboard UI rather than AML code:
- Cross-filtering: clicking a data point in one visualization filters others. See Cross-filtering.
- Drill-through: clicking a data point navigates to another dashboard. See Drill-through.
- Drill-down / Break-down: viewers add dimensions on the fly. See Drill-down & break-down.
See also
- DateDrillBlock: the control block for this interaction
- Date drills: concept guide and UI setup
- AML Dashboard: full dashboard syntax