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
    type: bar
    title: "Revenue by Category"
    x: category
    y: revenue
  orders_trend:
    query: _doc_examples.yaml#sales
    type: line
    title: "Orders Over Time"
    x: date
    y: units_sold
  products_breakdown:
    query: _doc_examples.yaml#sales
    type: pie
    title: "Product Breakdown"
    x: product
    y: revenue

rows:
  - revenue_by_category
  - orders_trend
  - products_breakdown
Sales Dashboard ElectronicsAccessoriesToolsCategory020,00040,00060,00080,000100,000120,000140,000160,000RevenueRevenue by Category2024Tue 02Wed 03Thu 04Fri 05Sat 06Jan 07Mon 08Tue 09Wed 10Thu 11Fri 12Sat 13Jan 14Mon 15Tue 16Wed 17Thu 18Fri 19Sat 20Jan 21Mon 22Tue 23Wed 24Thu 25Fri 26Sat 27Jan 28Mon 29Tue 30Wed 31FebruaryFri 02Sat 03Feb 04Mon 05Tue 06Wed 07Date020406080Units SoldOrders Over TimeGadget XGadget YTool ZWidget AWidget BProductProduct Breakdown
Sales Dashboard ElectronicsAccessoriesToolsCategory020,00040,00060,00080,000100,000120,000140,000160,000RevenueRevenue by Category2024Tue 02Wed 03Thu 04Fri 05Sat 06Jan 07Mon 08Tue 09Wed 10Thu 11Fri 12Sat 13Jan 14Mon 15Tue 16Wed 17Thu 18Fri 19Sat 20Jan 21Mon 22Tue 23Wed 24Thu 25Fri 26Sat 27Jan 28Mon 29Tue 30Wed 31FebruaryFri 02Sat 03Feb 04Mon 05Tue 06Wed 07Date020406080Units SoldOrders Over TimeGadget XGadget YTool ZWidget AWidget BProductProduct Breakdown

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
    type: bar
    title: "Revenue"
    x: product
    y: revenue
  orders:
    query: _doc_examples.yaml#sales
    type: line
    title: "Orders"
    x: date
    y: units_sold
  growth:
    query: _doc_examples.yaml#sales
    type: kpi
    title: "Total Revenue"
    metric: revenue

cols:
  - revenue
  - orders
  - growth
Comparison View Widget AWidget BGadget XGadget YTool ZProduct020,00040,00060,00080,000RevenueRevenueJan 07Jan 21Jan 14Jan 28Feb 04Date020406080Units SoldOrders235720Total Revenue
Comparison View Widget AWidget BGadget XGadget YTool ZProduct020,00040,00060,00080,000RevenueRevenueJan 07Jan 21Jan 14Jan 28Feb 04Date020406080Units SoldOrders235720Total Revenue

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
    type: kpi
    title: "Total Revenue"
    metric: revenue
  kpi2:
    query: _doc_examples.yaml#sales
    type: kpi
    title: "Units Sold"
    metric: units_sold
  kpi3:
    query: _doc_examples.yaml#sales
    type: kpi
    title: "Categories"
    metric: category
  main_chart:
    query: _doc_examples.yaml#sales
    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
Grid Dashboard 235720Total Revenue8121Units Sold0CategoriesWidget AWidget BGadget XGadget YTool ZProduct020,00040,00060,00080,000RevenueRevenue by Product Sales DataDateRegionProductCategoryRevenueUnits Sold2024-01-01NorthWidget AElectronics1500.00502024-01-01SouthWidget BElectronics2200.00802024-01-01EastGadget XAccessories850.00252024-01-01WestWidget AElectronics1800.0060+ 148 more rows
Grid Dashboard 235720Total Revenue8121Units Sold0CategoriesWidget AWidget BGadget XGadget YTool ZProduct020,00040,00060,00080,000RevenueRevenue by Product Sales DataDateRegionProductCategoryRevenueUnits Sold2024-01-01NorthWidget AElectronics1500.00502024-01-01SouthWidget BElectronics2200.00802024-01-01EastGadget XAccessories850.00252024-01-01WestWidget AElectronics1800.0060+ 148 more rows

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
    type: bar
    title: "Summary Chart"
    x: category
    y: revenue
  revenue_trend:
    query: _doc_examples.yaml#sales
    type: line
    title: "Revenue Trend"
    x: date
    y: revenue
  orders_trend:
    query: _doc_examples.yaml#sales
    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 ElectronicsAccessoriesToolsCategory020,00040,00060,00080,000100,000120,000140,000160,000RevenueSummary Chart
Multi-Tab Dashboard Overview Trends Details Overview ElectronicsAccessoriesToolsCategory020,00040,00060,00080,000100,000120,000140,000160,000RevenueSummary Chart

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


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