Fields and settings
What a custom visual gets from your card, how the card's fields fill it, and the settings you can change
A custom visual gets your card's rows and fields, already filtered for the person viewing the dashboard and formatted as the card shows them. Each visual says what it draws, such as stages and a size for a sankey. Those are its Fields in the panel, and the card's fields fill them. Its Settings are the options it offers you.
What your visual gets
- The card's rows. The same rows the card's table would show, in the same order, after dashboard filters and the viewer's permissions. Change a filter and the visual redraws.
- Each field's name. The visual labels axes, legends and tooltips with your field names. Rename a field on the card to change the label.
- Each value, formatted. Currency, decimals, units and date styles come from the card, so the visual shows "$1.23M" where the table does. See Get the right currency and number format.
- Your settings, brand and the card's size. The visual redraws when you resize the card, change a setting or switch between light and dark mode.
Dimensions and measures
Every field is one of two kinds:
- A dimension is something to group by: a region, a product, a channel, a date.
- A measure is a number: revenue, an order count, an average discount.
A visual asks for fields of each kind. A sankey takes several dimensions as its stages and one measure as the size of each flow. A gauge takes one measure and, optionally, a second one as its target.
How fields fill the visual
Your card's fields fill the visual by kind and in order:
- The card's dimensions fill the visual's dimension fields, in the order they sit on the card.
- The card's measures fill its measure fields, in order.
- A field that takes several, such as a sankey's Stages, takes every remaining field of its kind.
For a progress list that draws an Item, a Value and an optional Target:
| Card | Item | Value | Target |
|---|---|---|---|
| Product on Rows, Revenue and Revenue goal on Metrics | Product | Revenue | Revenue goal |
| Product on Rows, Revenue on Metrics | Product | Revenue | none: bars compare to the largest value |
| Revenue on Metrics only | missing | Revenue | none |
When a required field is missing, the card shows its table with a note such as "Add a field for Item." Add the field to the card, or pick one in the panel.
Choose a field yourself
Each field in the panel has a picker. In order fills it by position and names the fields it took, such as "In order: Channel, Region, Status". Pick a field to put that one there instead. Your choice is saved with the card.
- On a card built from fields, a picker offers fields of the right kind.
- On a SQL card, a picker offers every column, with the right kind first, so you can correct a column the visual read the wrong way. See SQL and config cards.
Measures that don't add up
A sum or a count adds up across rows; an average, a ratio, a distinct count or a running total doesn't. Visuals that add rows together, such as a sankey or a waterfall, need a measure that adds up. Given an average, they show a message such as "A Sankey adds its rows: use a sum or a count" rather than a wrong number.
On a card built from fields, the visual knows each measure's aggregate. On a SQL card it can't tell, so make sure the column you give such a visual is a sum or a count.
Settings
Settings are the options a visual offers in the panel. The assistant adds them when they're useful, or when you ask, for example "add a setting to hide the value labels".
| Setting | Shows as | Example |
|---|---|---|
| On or off | A switch | Show labels |
| A number | A number field | Rows to show |
| Text | A text field | A title for the target line |
| A choice | A list | Weeks start on Monday or Sunday |
| A colour | A list of your theme's colours | Highlight: accent |
A colour setting offers your theme's colours by name, such as positive, accent or palette-1, so it follows your brand in light and dark mode. Changing a setting redraws the preview; your choice is saved with the card.