Skip to main content

Intelligent App YAML Reference

This page provides a detailed reference for all attributes available in Intelligent App YAML definitions. Use this as a guide when authoring or reviewing your app configuration files.

Top-Level Structure


config Section

Style Configuration

Available themes: “default”, “teal”, “blue”, “green”, “purple”, “orange”, “amber”, “mono”

Custom Style Attributes

You can override theme colors using Tailwind CSS variables in OKLCH format. This allows fine-grained control over your app’s appearance:
Custom Theme Example
Common customizable CSS variables:
Colors must be specified in OKLCH format, including the oklch() wrapper (e.g., “oklch(0.9540 0.0134 286.2151)”). Other color formats such as HSL, RGB, or hex are not accepted.

layout Section

Defines the structure of the app (tabs, items, chart groups).

Layout Items


components Section

Holds the main building blocks: charts, variables, filters, texts, and widgets.

Charts

Composed Chart Example

Example: Bar Chart with Click-to-Filter

Example: Dynamic Chart with Chart Inputs

Chart inputs allow users to modify the query dynamically using interactive controls like dropdowns.
Static Options
Dynamic Options
Chart inputs can also fetch their dropdown options dynamically from database queries. This enables data-driven dropdowns and cascading input scenarios where one input’s value affects another input’s options.
Chart inputs work with all chart types and seamlessly integrate with Jinja templating, allowing you to create highly dynamic and interactive visualizations.
Key Features:
  • Filter-Dependent Options: Chart input options can change based on active tab-level filters
  • Cascading Inputs: One input’s value can affect another input’s available options
  • Template Variables: Use both tab-level filters and other chart input values in your options_query
You cannot define both options and options_query for the same chart input. Use options for static lists and options_query for dynamic, data-driven dropdowns.

Example: Pie Chart with Click-to-Filter

Example: Heatmap Chart

Heatmap charts require exactly 2 dimensions and at least 1 metric.

Example: Pivot Table Chart

A pivot_table chart lays a query result out as a hierarchical grid: dimensions placed on rows and columns, metrics as the values, and optional calculated metrics and conditional formats. The example below uses every pivot field. Its query must return a row per cost centre, including the parent rows, for the hierarchy to build.

Pivot Table Fields

Dimensions. Each dimension is one field of the query result. Pivot fields are only allowed on pivot_table charts. Metrics. Each metric is a column of the query result, except calculated metrics:
  • expression makes a metric calculated. It is a formula over the chart’s other metrics, using numbers, metric names, + - * / and parentheses, e.g. amount / quantity. It is worked out from the totals at every level, not summed row by row, so a ratio stays correct at every level. The metric’s name is an identifier only and does not need to be a query column.
  • A pivot needs at least one metric without an expression, since that is what gets summed.
pivot_by. Fields listed here become columns of the grid, the same as dimensions placed on columns. The designer rewrites them as dimensions when you change the layout. pivot_config. Display settings for the whole pivot. Only the settings you set are needed; the rest take the defaults below. Conditional formats. Each entry in conditional_formats names a metric of the chart:
Colour scales and data bars compare the cells of one row level, and totals are left out of the comparison.

Example: Conditional Chart Visibility

You can conditionally hide charts based on the query result data using hide_expression. The expression receives the data array and should return true to hide the chart:
In this example, the chart will only be displayed if the query returns 5 or more rows. This is useful for hiding charts when there’s insufficient data to display meaningfully.
The hide_expression is a JavaScript function that receives the data parameter (an array of query results) and must return a boolean value. Return true to hide the chart, or false to show it.

Example: Scatter Plot Chart

Scatter plot charts require exactly 1 dimension and 2-3 metrics. The first metric is plotted on the x-axis, the second metric on the y-axis, and an optional third metric can be used for additional visualization properties.

Example: Custom Chart

Variables

Filters

Texts

Markdown text components allow adding rich textual content to your apps.
Layout usage with a text item:
Text layout item properties:

Widgets

Custom React (TSX) components rendered inside the app grid. See Components: Widgets for the component contract.
Widget attributes: Layout usage with a widget item:
Widget layout item properties: Example:
The component must export default a React component. It receives data (query rows, or an empty array when no query is set) and appContext (filters, setFilter, theme). Only react and @datazone/widget-sdk can be imported.

Item Lists

List-style chart type. Each row supports icon, title, description, optional timestamp, and badge. Query result fields:

Example:

Example

Example for Number Chart Metrics

  • number charts support 1-2 metrics: one main metric and optionally one secondary metric (submetric)
  • radial charts support the same metric configuration as number charts
  • Use submetric_name and submetric_type to display a secondary metric below the main value
  • submetric_type options: plain (just show the value), change (show percentage change), delta (show difference)
  • For a full list of Lucide icons, see lucide.dev/icons
  • icon_variant must be one of: default, neutral, success, warning, error

Value Format Strings

All Intelligent App value formattings use Numeral.js formatting strings. Examples:

Notes