Dashboard component and chart designer

Dashboard component and chart designer

The Dashboard block is a grid container that neatly lays out charts, KPI cards, gauges, tables or any other component as sized widgets. Version 11 also reworks how charts are configured: a chart designer with a guided query builder, a test query table and a live preview replaces filling in traits by hand.

Building a dashboard

  1. Drop Dashboard on the page. The dashboard designer opens.
  2. Choose the grid: 12, 6, 4, 3, 2 or 1 columns, the gap, an optional fixed row height, whether widgets are wrapped in cards, and a title.
  3. Add widgets with the + Chart, + KPI card, + Progress gauge, + Record table and + Text block buttons. Each new widget opens its own designer straight away.
  4. Set the width (in grid columns) and height (in rows) of each widget in the list, reorder them with the arrows, or reopen a widget's configuration with the cog.
  5. Click Done and save the page.

You can also drop any block from the palette directly into the dashboard on the canvas: it is wrapped in a widget automatically. Select a widget to change its width, height and title in the properties panel. Widgets collapse to a single column on small screens.

Grid settings are stored as attributes on the dashboard element (columns, gap, row-height, cards, title) and the sizes on each widget (data-col-span, data-row-span, data-title). KPI cards, gauges and tables inside a dashboard keep their configuration in component_config.json like everywhere else.

The chart designer

Select a chart (inside a dashboard or standalone) and click the cog, or drop a new Chart block. The designer has two tabs and a live preview pane.

Data tab

Pick a data source:

For the Salesforce sources, Record id for :recordId holds the merge tag (default {{contactUser.Id}}) used when the filter references :recordId. Test query runs the query against the org and lists the labels and values that come back, or the error, so you can fix the query before saving. Queries that use :recordId are tested with the Emulated Contact of the Web Portal.

Appearance tab

Chart type, title, theme, palette, height, legend, fill, stacking, axis titles and behaviour, value format and currency, empty message, auto refresh and the builder preview mode.

Live preview

The preview on the right re-renders as you change settings, with live data when the query can run and sample data otherwise (per the preview mode). Click Apply to write the settings back to the chart. Everything is stored as chart attributes, so the properties panel, existing pages and the AI builder keep working, and a soql-builder attribute remembers the guided state.

See Add charts to a portal for the full list of chart attributes and the data provider contract.

Example dashboard markup

<x-dashboard columns="12" gap="md" cards="true" title="My overview">
    <div class="dashboard-widget" data-col-span="3"><x-kpi-card config-id="cfg_a1"></x-kpi-card></div>
    <div class="dashboard-widget" data-col-span="3"><x-kpi-card config-id="cfg_a2"></x-kpi-card></div>
    <div class="dashboard-widget" data-col-span="6" data-row-span="2"><x-chart-builder type="doughnut" title="Cases by status" soql="SELECT Status label, COUNT(Id) value FROM Case WHERE ContactId = :recordId GROUP BY Status ORDER BY COUNT(Id) DESC LIMIT 10" record-id="{{contactUser.Id}}"></x-chart-builder></div>
    <div class="dashboard-widget" data-col-span="6"><x-progress-gauge config-id="cfg_a3"></x-progress-gauge></div>
</x-dashboard>