Docs menu

Dashboard file reference

This page lists every field of a dashboard file (a file whose name ends in .ivy-dashboard.yaml). It is generated from the same schema Ivy checks the file with, so it always matches what Ivy accepts. What dashboards are for, with examples of each widget, is in Dashboards.

The assistant sees a dashboard file’s problems in the result whenever it saves one, including sources and columns that don’t exist in the space. To check the file in your own editor, use the JSON Schema Ivy serves at /schemas/dashboard.schema.json on your Ivy address. For editors that use the YAML language server, make this the first line of the file: # yaml-language-server: $schema=https://<your Ivy address>/schemas/dashboard.schema.json. In a sandbox, the schemas are in /opt/ivy/schemas/.

File fields

Field Type Required Default Description
description text no Shown under the title, up to 1,000 characters.
ivy one of dashboard/v1 yes The format version.
refreshed_by text no The flow file whose runs write the sources, such as Flows/weekly-sales.ivy-flow.yaml: the dashboard names it and says when its data last changed.
sources map of names to object, see sources.<name> no {} The data the widgets show, by name: lowercase letters, digits, - and _, starting with a letter.
title text yes 1 to 80 characters.
widgets list of object, see widgets (type: kpi) or object, see widgets (type: line) or object, see widgets (type: bar) or object, see widgets (type: area) or object, see widgets (type: pie) or object, see widgets (type: table) or object, see widgets (type: text) yes In order, left to right on a grid of 12 columns, starting a new row when one is full; on phones each widget takes the whole width.

sources.<name>

A file or a collection of the space, read when the dashboard opens, and what is done to its rows: filter, then group_by and aggregate, then columns, sort and limit.

Field Type Required Default Description
aggregate map of names to count or sum: text or avg: text or min: text or max: text no New columns, by name, each summarising the rows of a group.
collection text no A collection of the space, by name, instead of file: each record is a row, with the columns id, created_at, updated_at and one for each field. A person is their name, a list its items joined with commas and an option its label.
columns list of text no Keeps only these columns, in this order.
file text no A path from the top of the space to a .csv, .tsv, .json or .xlsx file. A CSV or TSV file’s first row names its columns; a JSON file holds a list of objects, whose keys are the columns.
filter list of object, see sources.<name>.filter no Keeps the rows that match every condition.
group_by list of text no One row for each distinct combination of these columns, with the columns of aggregate. With aggregate alone, all rows become one.
limit whole number no Keeps the first rows only, after sorting.
max_rows whole number no 10000 The most rows the file may have, at most 100,000; a source with more rows shows an error instead.
range text no For an .xlsx file: the cells to read, such as A1:F200, the first row naming the columns; all the sheet’s cells when left out.
sheet text no For an .xlsx file: the sheet, by name; the first sheet when left out.
sort list of object, see sources.<name>.sort no Orders the rows by these columns, the first one first.
table text no For an .xlsx file: an Excel table, by name, instead of sheet and range.

widgets (type: kpi)

One number, large, with how it compares.

Field Type Required Default Description
aggregate one of sum, avg, min, max, count, first, last no sum How the column’s values become one number. count: The number of rows, whatever value holds. first: The value of the first row. last: The value of the last row.
compare object, see widgets.compare no What the number is compared with: the change shows beside it.
description text no
format object, see widgets.format no How numbers and dates show, in the reader’s language.
source text yes A source of sources, by name.
title text yes
type kpi yes
value text yes The column the number comes from.
width whole number no Grid columns, 1 to 12.

widgets (type: line)

Lines over x, one for each column of y.

Field Type Required Default Description
description text no
format object, see widgets.format no How numbers and dates show, in the reader’s language.
source text yes A source of sources, by name.
stacked true or false no Draws the columns of y on top of each other.
title text yes
type line yes
width whole number no Grid columns, 1 to 12.
x text yes The column along the bottom: dates, numbers or text.
y list of text yes The columns of numbers drawn, 1 to 8.

widgets (type: bar)

Bars for each value of x, one for each column of y.

Field Type Required Default Description
description text no
format object, see widgets.format no How numbers and dates show, in the reader’s language.
source text yes A source of sources, by name.
stacked true or false no Draws the columns of y on top of each other.
title text yes
type bar yes
width whole number no Grid columns, 1 to 12.
x text yes The column along the bottom: dates, numbers or text.
y list of text yes The columns of numbers drawn, 1 to 8.

widgets (type: area)

Filled lines over x, one for each column of y.

Field Type Required Default Description
description text no
format object, see widgets.format no How numbers and dates show, in the reader’s language.
source text yes A source of sources, by name.
stacked true or false no Draws the columns of y on top of each other.
title text yes
type area yes
width whole number no Grid columns, 1 to 12.
x text yes The column along the bottom: dates, numbers or text.
y list of text yes The columns of numbers drawn, 1 to 8.

widgets (type: pie)

Slices of a whole, one for each row.

Field Type Required Default Description
description text no
donut true or false no Draws a ring instead of a full circle.
format object, see widgets.format no How numbers and dates show, in the reader’s language.
label text yes The column that names each slice.
source text yes A source of sources, by name.
title text yes
type pie yes
value text yes The column of numbers that sizes each slice.
width whole number no Grid columns, 1 to 12.

widgets (type: table)

The rows, with headings people can sort by.

Field Type Required Default Description
columns list of object, see widgets.columns no The columns shown, in order; all of the source’s when left out.
description text no
format object, see widgets.format no For every column of numbers or dates without a format of its own.
sort object, see sources.<name>.sort no How the rows are ordered at first.
source text yes A source of sources, by name.
title text yes
type table yes
width whole number no Grid columns, 1 to 12.

widgets (type: text)

Markdown text, such as notes on the figures.

Field Type Required Default Description
markdown text yes Up to 10,000 characters of Markdown.
title text no
type text yes
width whole number no Grid columns, 1 to 12.

sources.<name>.filter

Field Type Required Default Description
column text yes
op one of gte, lt, lte, eq, ne, gt, contains, in yes eq: Equal to value. ne: Not equal to value. gt: Greater than value: numbers by size, dates by time, text alphabetically. contains: Text that contains value, ignoring case. in: Equal to one of the values of the list.
value true or false or number or text or list of true or false or number or text yes A text, number or true or false; a list of them for in.

sources.<name>.sort

Field Type Required Default Description
column text yes
order one of asc, desc no asc

widgets.compare

Field Type Required Default Description
better one of up, down no up Which way is good: the change shows as good or bad in colour and words.
column text no The column to compare with, reduced as aggregate says, such as a target; left out, the last row is compared with the row before it, with aggregate: last.
label text no Shown with the change, such as vs last week.

widgets.format

How numbers and dates show, in the reader’s language.

Field Type Required Default Description
currency text no With style: currency: the ISO 4217 code, such as EUR.
date one of day, month, quarter, year, datetime no How much of a date shows. datetime: The day and the time.
decimals whole number no Digits after the decimal point, 0 to 6.
style one of number, percent, currency, compact no number: 1,234.5. percent: 0.25 shows as 25%. currency: With the symbol of currency. compact: 1.2K, 3.4M.
unit text no Shown after each number, such as kWh.

widgets.columns

Field Type Required Default Description
column text yes
format object, see widgets.format no How numbers and dates show, in the reader’s language.
label text no The heading; the column’s name when left out.

Example

ivy: dashboard/v1
title: Sales
description: Closed deals, from the CRM export the weekly flow writes.
refreshed_by: Flows/weekly-sales.ivy-flow.yaml
sources:
  by_month:
    file: Reports/deals.csv
    filter:
      - column: stage
        op: eq
        value: closed
    group_by:
      - month
    aggregate:
      deals: count
      revenue:
        sum: amount
    sort:
      - column: month
  by_region:
    file: Reports/deals.csv
    group_by:
      - region
    aggregate:
      revenue:
        sum: amount
    sort:
      - column: revenue
        order: desc
  deals:
    file: Reports/deals.csv
    filter:
      - column: stage
        op: eq
        value: closed
  open_tasks:
    collection: tasks
    filter:
      - column: status
        op: ne
        value: Done
    group_by:
      - status
    aggregate:
      tasks: count
widgets:
  - type: kpi
    title: Revenue
    source: deals
    value: amount
    format:
      style: currency
      currency: EUR
      decimals: 0
  - type: kpi
    title: Revenue this month
    source: by_month
    value: revenue
    aggregate: last
    compare:
      label: vs last month
    format:
      style: currency
      currency: EUR
      decimals: 0
  - type: bar
    title: Revenue by month
    source: by_month
    x: month
    y:
      - revenue
    format:
      style: compact
      date: month
  - type: pie
    title: Revenue by region
    source: by_region
    label: region
    value: revenue
    donut: true
  - type: bar
    title: Open tasks
    source: open_tasks
    x: status
    y:
      - tasks
  - type: table
    title: Largest deals
    source: deals
    columns:
      - column: customer
      - column: amount
        format:
          style: currency
          currency: EUR
      - column: closed_on
        label: Closed
        format:
          date: day
    sort:
      column: amount
      order: desc
    width: 12