InsightInteraction
An InsightInteraction is a client-side transformation applied to an insight's pre-computed data in the viewer — no query re-runs, so results update instantly.
Each interaction is a ?{ ... } expression that does one of three things:
- filter: keeps only the rows where a boolean expression is true.
- split: breaks the insight into one series per distinct value of an expression.
- sort: orders the rows by an expression (append
ASC/DESCto control direction).
Reference model columns with ${ref(model).column} and input values with
accessors like ${ref(my-input).value} to wire interactions up to
inputs for dynamic dashboards.
Example
insights:
- name: revenue-by-month
props:
type: bar
x: ?{ ${ref(orders).month} }
y: ?{ sum(${ref(orders).amount}) }
interactions:
- filter: ?{ ${ref(orders).region} = ${ref(region-input).value} }
- split: ?{ ${ref(orders).product_line} }
- sort: ?{ ${ref(orders).month} ASC }
Attributes
| Field | Type | Default | Description |
|---|---|---|---|
| filter | string | None | Boolean expression evaluated per row in the viewer; only rows where it is true are kept. |
| split | string | None | Column or expression whose distinct values break the insight into multiple plotly series. |
| sort | string | None | Column or expression to sort rows by; append ASC or DESC to control direction. |