AML VizBlock
VizBlock wraps a visualization (chart, table, KPI) with a label and optional styling. The viz parameter specifies the chart type and its configuration.
Syntax
block <name>: VizBlock {
label: 'Block Title'
viz: <ChartType> {
dataset: <dataset_name>
// chart-specific parameters
}
theme: BlockTheme { ... } // optional
}
Parameters
| Parameter | Description |
|---|---|
label | Display name shown as the block title. |
viz | The visualization object. See chart types below. |
theme | Optional BlockTheme override for visual styling. |
Chart types
The viz parameter accepts any of the following chart types:
| Chart type | Description |
|---|---|
DataTable | Every row of your query result, sortable and formatted |
PivotTable | Cross-tabulate values across rows and columns to compare groups |
RetentionHeatmap | Track how groups of users behave over time after a starting event |
ConversionFunnel | Visualize drop-off across the steps of a multi-stage process |
MetricSheet | A spreadsheet-style grid for laying out metrics side by side |
MetricKpi | Show one headline number, with optional comparison and trend |
GaugeChart | Plot a value against a range to show progress toward a target |
LineChart | Show how values change over a continuous dimension like time |
AreaChart | A line chart with the area below filled in to emphasize volume |
BarChart | Compare values across categories with horizontal bars |
ColumnChart | Compare values across categories with vertical columns |
CombinationChart | Layer columns and lines together to plot two related measures |
PieChart | Show how parts make up a whole as proportional slices |
ScatterChart | Plot two measures against each other to spot correlation |
BubbleChart | A scatter chart with a third measure mapped to bubble size |
FunnelChart | Show staged values as tapering segments |
PyramidChart | Show ranked values as tapering segments |
RadarChart | Compare several measures across categories on a circular axis |
WordCloud | Size words by frequency to highlight prominent terms |
Heatmap | Shade cells by value to reveal concentration |
PointMap | Drop a marker at each location to show individual data points |
FilledMap | Color regions by value for choropleth-style comparisons |
CustomChart | Render a CustomChartDef template with your own Vega-Lite spec |
MarkdownViz | Render data-driven content with your own Markdown template |
Example
block revenue_chart: VizBlock {
label: 'Revenue Over Time'
viz: CombinationChart {
dataset: ecommerce
settings {
row_limit: 5000
legend_label: 'top'
}
}
}
block order_count: VizBlock {
label: 'Total Orders'
viz: SingleValue {
dataset: ecommerce
series {
field {
ref: r(orders.id)
aggregation: 'count'
}
}
}
}
For per-chart-type parameters, the AML editor shows accepted values on hover. You can also apply a VizTheme inside the viz object to override table styling.
See also
- AML Dashboard: full dashboard syntax
- AML Theme:
BlockThemeandVizThemereference