diff --git a/guides/developer/dashboards-as-code.mdx b/guides/developer/dashboards-as-code.mdx index 7354ea16..df076792 100644 --- a/guides/developer/dashboards-as-code.mdx +++ b/guides/developer/dashboards-as-code.mdx @@ -472,7 +472,7 @@ tiles: type: markdown properties: title: My cool dashboard - hideTitle: false + hideFrame: false # Set to true to hide the markdown tile's frame content: |- # Markdown tiles have their config stored here under 'content'. This is an example of a markdown tile @@ -483,6 +483,25 @@ tiles: - points And so on... + - x: 0 + "y": 11 + h: 2 + w: 36 + tabUuid: null + type: heading + properties: + text: Sales overview + showDivider: true # Renders a horizontal divider below the heading + - x: 0 + "y": 13 + h: 6 + w: 36 + tabUuid: null + type: data_app + properties: + title: Sales explorer + hideTitle: false + appUuid: 1a2b3c4d-5e6f-7890-abcd-ef1234567890 # UUID of the data app to embed filters: # Filters are split by whether they are performed # on a metric, dimension or table calculation. @@ -543,6 +562,42 @@ verified: true # See /guides/verified-content for full semantics. ``` +#### Tile types + +Each tile in the `tiles:` list has a `type` and a matching `properties` object. The supported tile types and their writable properties are: + +| `type` | Properties | +| --- | --- | +| `saved_chart` | `title`, `hideTitle`, `chartSlug` | +| `sql_chart` | `title`, `hideTitle`, `chartSlug` | +| `markdown` | `title`, `hideFrame`, `content` | +| `loom` | `title`, `hideTitle`, `url` | +| `heading` | `text`, `showDivider` | +| `data_app` | `title`, `hideTitle`, `appUuid` | + +A few things worth calling out: + +- **Markdown tiles** use `hideFrame` (not `hideTitle`) to hide the tile's frame. The title is set via the `title` property. +- **Heading tiles** support `showDivider: true` to render a horizontal divider line below the heading text — useful for visually separating sections of a dashboard. +- **Data app tiles** reference an existing [data app](/guides/data-apps) by its `appUuid`. The data app itself isn't managed as code, so make sure the referenced app exists in the target project before uploading. To find the `appUuid`, open the data app in Lightdash and copy it from the URL. + +#### Tabs + +If your dashboard uses tabs, each tab can be configured with these properties: + +```yml +tabs: + - uuid: 7b1c2d3e-4f56-7890-abcd-ef1234567890 + name: Overview + order: 0 + - uuid: 8c2d3e4f-5678-90ab-cdef-1234567890ab + name: Internal metrics + order: 1 + hidden: true # Hides the tab from the tab bar while keeping its tiles in the file +``` + +Set `hidden: true` to keep a tab's content in the file but hide it from the tab bar in the UI — handy for drafting or temporarily archiving a section without deleting it. + ### Charts Charts store a large amount of configuration, and so are more complex and more variable that what you will find within the dashboard yml files.