Skip to content

Board Layouts

The layout of a board determines how its children (charts and nested boards) are arranged. Dataface supports four layout types.


Rows (Vertical Stack)

Items are arranged vertically, one after another. This is the default structure for top-level boards.

title: "Sales Dashboard"

charts:
  revenue_by_category:
    query: _doc_examples.yaml#sales_by_category
    type: bar
    title: "Revenue by Category"
    x: category
    y: revenue
  orders_trend:
    query: _doc_examples.yaml#sales_by_date
    type: line
    title: "Orders Over Time"
    x: date
    y: units_sold
  products_breakdown:
    query: _doc_examples.yaml#sales_by_product
    type: pie
    title: "Product Breakdown"
    theta: revenue
    color: product

rows:
  - revenue_by_category
  - orders_trend
  - products_breakdown
Sales Dashboard AccessoriesElectronicsToolsCategory$0$20,000$40,000$60,000$80,000$100,000$120,000$140,000$160,000RevenueRevenue by CategoryTue 02Thu 04Sat 06Mon 08Wed 10Fri 12Jan 14Tue 16Thu 18Sat 20Mon 22Wed 24Fri 26Jan 28Tue 30FebruarySat 03Mon 05Wed 07Date190200210220230Units SoldOrders Over TimeGadget XGadget YTool ZWidget AWidget BProductProduct Breakdown 2026-03-23 08:25
Sales Dashboard AccessoriesElectronicsToolsCategory$0$20,000$40,000$60,000$80,000$100,000$120,000$140,000$160,000RevenueRevenue by CategoryTue 02Thu 04Sat 06Mon 08Wed 10Fri 12Jan 14Tue 16Thu 18Sat 20Mon 22Wed 24Fri 26Jan 28Tue 30FebruarySat 03Mon 05Wed 07Date190200210220230Units SoldOrders Over TimeGadget XGadget YTool ZWidget AWidget BProductProduct Breakdown 2026-03-23 08:25

Use rows when: - Content should flow vertically - Building mobile-friendly layouts - Creating scrollable dashboards


Cols (Horizontal Stack)

Items are arranged horizontally, side-by-side.

title: "Comparison View"

charts:
  revenue:
    query: _doc_examples.yaml#sales_by_product
    type: bar
    title: "Revenue"
    x: product
    y: revenue
  orders:
    query: _doc_examples.yaml#sales_by_date
    type: line
    title: "Orders"
    x: date
    y: units_sold
  growth:
    query: _doc_examples.yaml#sales_summary
    type: kpi
    title: "Total Revenue"
    metric: revenue

cols:
  - revenue
  - orders
  - growth
Comparison View Gadget XGadget YTool ZWidget AWidget BProduct$0$20,000$40,000$60,000$80,000RevenueRevenueTue 02Thu 04Sat 06Mon 08Wed 10Fri 12Jan 14Tue 16Thu 18Sat 20Mon 22Wed 24Fri 26Jan 28Tue 30FebruarySat 03Mon 05Wed 07Date190200210220230Units SoldOrders Total Revenue 847,293 2026-03-23 08:25
Comparison View Gadget XGadget YTool ZWidget AWidget BProduct$0$20,000$40,000$60,000$80,000RevenueRevenueTue 02Thu 04Sat 06Mon 08Wed 10Fri 12Jan 14Tue 16Thu 18Sat 20Mon 22Wed 24Fri 26Jan 28Tue 30FebruarySat 03Mon 05Wed 07Date190200210220230Units SoldOrders Total Revenue 847,293 2026-03-23 08:25

Use cols when: - Comparing metrics side-by-side - Creating sidebars - Building wide-screen layouts


Grid Layout

Items are arranged in a flexible grid. Items flow automatically into the next available space, but you can control their position and size using x, y, width and height.

title: "Grid Dashboard"

charts:
  kpi1:
    query: _doc_examples.yaml#sales_summary
    type: kpi
    title: "Total Revenue"
    metric: revenue
  kpi2:
    query: _doc_examples.yaml#sales_summary
    type: kpi
    title: "Units Sold"
    metric: units_sold
  kpi3:
    query: _doc_examples.yaml#sales_summary
    type: kpi
    title: "Categories"
    metric: category_count
  main_chart:
    query: _doc_examples.yaml#sales_by_product
    type: bar
    title: "Revenue by Product"
    x: product
    y: revenue
  data_table:
    query: _doc_examples.yaml#sales
    type: table
    title: "Sales Data"

grid:
  columns: 12
  items:
    - item: kpi1
      width: 4
    - item: kpi2
      width: 4
    - item: kpi3
      width: 4
    - item: main_chart
      width: 12
    - item: data_table
      width: 12
Rendering Error
Failed to render dataface: Query execution failed: DuckDB SQL execution failed: Catalog Error: Table with name sales does not exist! Did you mean "sqlite_master"? LINE 1: SELECT * FROM sales ^ (query: _doc_examples.yaml#sales)
Rendering Error
Failed to render dataface: Query execution failed: DuckDB SQL execution failed: Catalog Error: Table with name sales does not exist! Did you mean "sqlite_master"? LINE 1: SELECT * FROM sales ^ (query: _doc_examples.yaml#sales)

Grid Features

  • Flow: Items without x,y fill the next available space
  • Pinning: Items with x,y are fixed to that position
  • Smart Sizing: Charts use natural default sizes based on type
  • Overlapping: Multiple items can occupy the same cells
  • Gap: The gap property controls structural spacing

Note: Sizing properties (width, height, x, y) are defined on the layout item, not the chart itself.


Tab Layout

Organize items into tabs. Each item in the items list is a nested board that defines the content for that tab.

title: "Multi-Tab Dashboard"

charts:
  summary:
    query: _doc_examples.yaml#sales_by_category
    type: bar
    title: "Summary Chart"
    x: category
    y: revenue
  revenue_trend:
    query: _doc_examples.yaml#sales_by_date
    type: line
    title: "Revenue Trend"
    x: date
    y: revenue
  orders_trend:
    query: _doc_examples.yaml#sales_by_date
    type: line
    title: "Orders Trend"
    x: date
    y: units_sold
  details:
    query: _doc_examples.yaml#sales
    type: table
    title: "Detailed Table"

tabs:
  items:
    - title: "Overview"
      rows:
        - summary

    - title: "Trends"
      cols:
        - revenue_trend
        - orders_trend

    - title: "Details"
      rows:
        - details
Multi-Tab Dashboard Overview Trends Details Overview AccessoriesElectronicsToolsCategory$0$20,000$40,000$60,000$80,000$100,000$120,000$140,000$160,000RevenueSummary Chart 2026-03-23 08:25
Multi-Tab Dashboard Overview Trends Details Overview AccessoriesElectronicsToolsCategory$0$20,000$40,000$60,000$80,000$100,000$120,000$140,000$160,000RevenueSummary Chart 2026-03-23 08:25

Use tabs when: - Managing dashboard density - Organizing related views - Hiding content until needed


Details (Collapsible Sections)

Any nested board item can be made collapsible by adding details. This renders a clickable summary bar that expands/collapses the content — no JavaScript needed.

title: "Dashboard with Details"

charts:
  summary:
    query: _doc_examples.yaml#sales_by_category
    type: bar
    title: "Revenue Summary"
    x: category
    y: revenue
  breakdown:
    query: _doc_examples.yaml#sales
    type: table
    title: "Full Data"

rows:
  - summary

  - details: "Show Raw Data"
    expanded_title: "Hide Raw Data"
    rows:
      - breakdown
Dashboard with Details AccessoriesElectronicsToolsCategory$0$20,000$40,000$60,000$80,000$100,000$120,000$140,000$160,000RevenueRevenue SummaryShow Raw Data 2026-03-23 08:25
Dashboard with Details AccessoriesElectronicsToolsCategory$0$20,000$40,000$60,000$80,000$100,000$120,000$140,000$160,000RevenueRevenue SummaryShow Raw Data 2026-03-23 08:25

Use details when: - Hiding secondary content behind a toggle - Reducing dashboard clutter - Progressive disclosure of complex data


Choosing a Layout

Layout Best For
Rows Simple vertical flow, mobile, scrolling
Cols Comparing metrics, sidebars
Grid Precise control, dense dashboards
Tabs Multiple views, reducing clutter
Details Collapsible sections, progressive disclosure