Use YAML in the Dashboard Builder

This page provides a reference of the YAML structure for the various objects that you manipulate in theSemarchy xDM Dashboard.

All objects in the Dashboard Builder are stored in YAML form: a text representation of the object, which can be edited.

Introduction to YAML

YAML is a data representation language used for the objects of the Dashboard Builder.

This section gives a quick overview of the YAML language.

Comments

Comments are lines starting with a # sign.

Object and properties

An object is represented in a <object type>: form, with its properties listed on the following lines, with a two-space indentation. Each property is represented in a <property key>: <property value> form.

Example 1. Object palette with its type and shade properties
# Simple palette object palette:
  type: MD_COLORFUL
  shade: '500'

Similarly, a child object is represented with a two-space indentation after its parent object, with its own properties. A child object may have its own children, with 4 space indentation, and so on.

Arrays

Arrays are represented as <array name>:, followed by their items on the next lines, with an indentation, and prefixed with a - sign. An empty array is indicated as a pair of square brackets [].

Example 2. Using arrays in the application navigationDrawer object
# The navigationDrawer object in the application has a child object: Group.
# Group is which is an array of objects.
# Note the dashboardArguments arrays, which are empty.
navigationDrawer:
  groups:
    - label: Products
      showDivider: true
      items:
        - dashboard: ProductDashboard
          icon: 'images://mdi/label-outline.svg'
          label: Brands
          dashboardArguments: []
        - dashboard: WIPDashboard
          icon: 'images://mdi/people.svg'
          label: Families (WIP)
          dashboardArguments: []
    - label: Customers
      showDivider: true
      items:
        - dashboard: AccoundCreditMetrics
          icon: 'images://mdi/account-card-details.svg'
          label: Credit Metrics
          dashboardArguments: []