Reference
Theme fields
Every theme field the embed reads, and what the brand color paints.
The theme sets your brand once per data app. One theme styles the legacy and the v2 design, in light and dark mode. Set it in the Theming screen of your data app, or pass it on the element.
The derived brand colors, chart gradients and axis theme fields below require the plugin release that ships with this docs update ({{PLUGIN_VERSION}} or later).
Set the theme
If you use a plugin older than 0.17.0, update it to apply a saved theme’s dark mode. Choose a version.
Set theme fields in admin-theme-options on <dbn-dashboard>, or save them in a theme and load it with theme-name:
<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
theme-name="Brand"
admin-theme-options='{
"general": { "fontFamily": "Inter" },
"dashboard": { "ctaColor": "#4F46E5", "ctaTextColor": "#FFFFFF" },
"cardCustomization": { "borderRadius": "12px" },
"chart": {
"selected": "Brand",
"gradient": { "enabled": true, "startColor": "#4F46E5", "endColor": "#A5B4FC", "direction": "bottom" }
}
}'
></dbn-dashboard>Each field you set goes on top of the named theme. A field you leave out keeps its value. Style an embed has the order the embed reads theme props in.
The brand color
Set dashboard.ctaColor and select Brand with chart.selected to derive the colors below. A saved palette named Brand keeps its own colors. The example uses #4f46e5:
| What it paints | Light | Dark |
|---|---|---|
| Primary color token | #4f46e5 | #4f46e5 |
| Text and icons on the brand color | #ffffff | #ffffff |
| The brand color under the pointer | #4433d3 | #5b57f7 |
| The brand color while pressed | #3c22c6 | #6668fd |
| Focus ring and selected outline | #4f46e5 | #5e5bfa |
| Links and selected labels | #4f46e5 | #7983fe |
| The fill of a selected row | #ecefff | #242849 |
| Text on that fill | #4f46e5 | #7d88fb |
| A soft brand border | #c5ceff | #404683 |
- To choose a separate brand color for dark mode, set
general.darkOverrides.dashboard.ctaColor. - Text on the brand color, links and labels reach a 4.5:1 contrast; lines and the focus ring reach 3:1.
- Set
dashboard.ctaTextColorfor the text on the brand color. The embed adjusts text colors with low contrast. Usegeneral.darkOverrides.dashboard.ctaTextColorto set button text for dark mode. - A mode with no brand color or with
#18181bkeeps its original colors. - A chart palette that starts from your brand is 8 colors:
#4f46e5,#1d6c0d,#9b7e00,#e06572,#2491b2,#006d4a,#e0692e,#8949a3.
The table describes the derived theme tokens. Shared calendar controls can use their default Light colors. Style the date filter shows how to target individual date filter parts.
Brand gradient
chart.gradient fills the first series of a bar, stacked bar or row chart:
- Set
enabledtotrueand use hex for both colors:#rgb,#rrggbbor#rrggbbaa. directionis where the end color sits:top,bottom,leftorright. Not set meansbottom.
In v2, either a valid enabled chart.gradient or viewer gradient editing enables saved fills on these charts. To opt in through viewer settings, set customSettings.gradients.canEdit to true and keep Chart Colors enabled. The section is enabled by default. Set chartColors.canEdit to false to disable it.
A nonempty list of saved gradient rows takes precedence. The chart skips invalid rows and applies the valid fills in order, starting with the first series. Any remaining series use palette colors. When the metric has no saved rows, the theme gradient can fill the first series. Without either opt-in, v2 charts keep their palette. Classic continues to draw its saved gradients.
Grid lines, tick marks and axis titles
Three blocks in chart.axis set the look of the axes on column, bar, stacked, line, area, combo, scatter, bubble, waterfall and time series charts. Pie, funnel, treemap, gauge, map and table do not change.
{
"chart": {
"axis": {
"gridLines": "horizontal",
"tickLines": "hide",
"titleStyle": { "fontFamily": "Georgia, serif", "fontSize": 13, "fontWeight": 600, "fontStyle": "italic" }
}
}
}| Field | Values | Not set |
|---|---|---|
chart.axis.gridLines | auto, horizontal, vertical, both, none. Named by the way the line runs: horizontal lines run across the chart. | auto: each chart draws its own default |
chart.axis.tickLines | auto, show, hide. Both axes. | auto: each chart’s default |
chart.axis.titleStyle.fontFamily | A font name or stack. A font in general.fonts loads first. | The chart font |
chart.axis.titleStyle.fontSize | px, 8 to 48. 13 and "13px" both work. | 14 |
chart.axis.titleStyle.fontWeight | 100 to 900 in steps of 100, normal or bold | 500 |
chart.axis.titleStyle.fontStyle | normal, italic | normal |
The axis title is the name beside an axis, such as “Revenue”. The chart draws it on a canvas, so CSS and ::part() cannot reach it. Use chart.axis.titleStyle for the font. The existing chart.axis.title string still holds title text.
Which setting wins, highest first:
- The host chart appearance. Use
options.chartAppearanceon a dashboard orchart-appearanceon a standalone metric. - The metric’s own saved setting. For grid lines and tick marks, this is also a viewer’s choice in chart settings. For the title font, only a font that differs from the builder default (14px, weight 500) counts.
chart.axisin the theme.- The chart’s default.
A metric that already saves its own grid line and tick switches keeps them. To force grid line visibility, set horizontalAxis.hideSplitLines or verticalAxis.hideSplitLines in the host chart appearance.
A value outside the list is ignored with one console warning, and the chart uses the next setting down. You can also set these in Settings > Theming > Chart.
To let viewers change ticks, grid lines or gradient fill, use viewer chart settings.
All theme fields
chart.axis.labels: "all" shows each category where the chart uses the theme label rule. Saved rules for intervals, zoom or rotation take priority. A long first category label can still extend beyond the chart edge.
Every field below also works inside general.darkOverrides, except the fields in general and the layout options. The embed uses those values in dark mode.
89 fields.
| Field | Type | What it sets |
|---|---|---|
general.fontFamily | font name | Font for the whole dashboard |
general.mode | light or dark. For auto, set general.isSystemMode to true | Light, dark, or follow the viewer |
general.datePickerFormat | string | Date picker format |
general.density | comfortable, compact | Spacing density |
dashboard.backgroundColor | color | Page background |
dashboard.metricCardColor | color | Card background |
dashboard.ctaColor | color | Button color |
dashboard.ctaTextColor | color | Button text |
dashboard.selectBoxSize | small, medium, large | Filter size |
dashboard.selectBoxVariant | floating, static | Filter style |
dashboard.selectBoxBorderRadius | px, 0 to 24 | Filter corner radius |
dashboard.selectBoxTextColor | color | Filter text |
dashboard.horizontalGap | number, 0 to 20 | Horizontal gap between cards |
dashboard.verticalGap | number, 0 to 20 | Vertical gap between cards |
dashboard.disableDashboardMinimap | boolean | Hide the dashboard minimap |
dashboard.filterBar.layout | inline, row, full-width | Filter bar layout |
dashboard.filterBar.labelPlacement | auto, above, inside, hidden | Filter label placement |
dashboard.filterBar.dateRangeLabel | off, on | Date range in words |
cardTitle.fontWeight | 300, normal, 500, 600, bold, 800 | Card title weight |
cardTitle.fontSize | px, 10 to 32 | Card title size |
cardTitle.color | color | Card title text |
cardTitle.elementColor | color | Section title text |
cardDescription.fontWeight | 300, normal, 500, 600, bold, 800 | Card description weight |
cardDescription.fontSize | px, 9 to 20 | Card description size |
cardDescription.color | color | Card description text |
cardDescription.elementColor | color | Section description text |
cardCustomization.borderRadius | px, 0 to 32 | Card corner radius |
cardCustomization.padding | px, 0 to 40 | Card padding |
cardCustomization.shadow | none, small, medium, large | Card shadow |
card | boolean | No shadow change on hover |
cardCustomization.disableStroke | boolean | No card border |
cardCustomization.metricStrokeColor | color | Card border color |
card | boolean | Scale card text with width |
cardCustomization.darkElevation | boolean | Lift cards in dark mode |
chart.selected | palette name | Chart palette in use |
chart.paletteOptions | array of palette names | Palettes embed users may pick |
chart.palettes | [{ name, colors[] }] | Chart palettes (name and colors) |
chart.fontFamily | font name | Chart font |
chart.fontColor | color | Chart text |
chart.referenceLineColor | color | Reference line color (a line’s own color wins) |
chart.letterSpacing | px, -2 to 6 | Chart letter spacing |
chart.chartSettingsOverride | boolean | Theme chart text wins over each metric |
chart.legend.position | auto, top, bottom, right, hidden | Chart legend position |
chart.axis.labels | auto, all | Chart axis labels (all keeps every category) |
chart.axis.gridLines | auto, horizontal, vertical, both, none | Chart grid lines (by the direction the line runs) |
chart.axis.tickLines | auto, show, hide | Chart axis tick marks |
chart.axis.titleStyle.fontFamily | font name | Axis title font (x and y axis names) |
chart.axis.titleStyle.fontSize | number, 8 to 48 | Axis title size (px) |
chart.axis.titleStyle.fontWeight | 300, 400, 500, 600, 700, 800 | Axis title weight |
chart.axis.titleStyle.fontStyle | normal, italic | Axis title style |
chart.gradient.enabled | boolean | Brand gradient on bar charts |
chart.gradient.startColor | color | Gradient start color |
chart.gradient.endColor | color | Gradient end color |
chart.gradient.direction | top, bottom, left, right | Gradient direction |
chart.tooltip.header.fontFamily | font name | Tooltip header font |
chart.tooltip.header.fontSize | number, 8 to 28 | Tooltip header size |
chart.tooltip.header.fontWeight | 300, normal, 500, 600, bold, 800 | Tooltip header weight |
chart.tooltip.header.fontColor | color | Tooltip header text |
chart.tooltip.label.fontFamily | font name | Tooltip label font |
chart.tooltip.label.fontSize | number, 8 to 28 | Tooltip label size |
chart.tooltip.label.fontWeight | 300, normal, 500, 600, bold, 800 | Tooltip label weight |
chart.tooltip.label.fontColor | color | Tooltip label text |
chart.tooltip.value.fontFamily | font name | Tooltip value font |
chart.tooltip.value.fontSize | number, 8 to 28 | Tooltip value size |
chart.tooltip.value.fontWeight | 300, normal, 500, 600, bold, 800 | Tooltip value weight |
chart.tooltip.value.fontColor | color | Tooltip value text |
chart.tooltip.card.padding | number, 0 to 32 | Tooltip padding |
chart.tooltip.card.borderRadius | number, 0 to 24 | Tooltip corner radius |
chart.tooltip.card.bgColor | color | Tooltip fill |
chart.tooltip.card.borderColor | color | Tooltip border |
chart.tooltip.override | boolean | Theme tooltip wins over each metric |
chart. | color | Table header text |
chart.tableSettings.header.bgColor | color | Table header fill |
chart. | regularfont, boldfont | Table header weight |
chart.tableSettings.header.fontSize | number, 8 to 28 | Table header size |
chart. | color | Table cell text |
chart. | 300, 400, 500, 600, 700, 800 | Table cell weight |
chart. | number, 8 to 28 | Table cell size |
chart.tableSettings.content.lineGap | small, medium, large | Table row spacing |
chart.tableSettings.override | boolean | Theme table style wins over each metric |
chart.tableSettings.autoPagination | boolean | Table pagination fits the card |
dashboard. | color | Underlying data header text |
dashboard. | color | Underlying data header fill |
dashboard. | regularfont, boldfont | Underlying data header weight |
dashboard. | number, 8 to 28 | Underlying data header size |
dashboard. | color | Underlying data cell text |
dashboard. | 300, 400, 500, 600, 700, 800 | Underlying data cell weight |
dashboard. | number, 8 to 28 | Underlying data cell size |
dashboard. | small, medium, large | Underlying data row spacing |
Scheduled email reports and the PDF download take only the brand color, logo, chart palette and date format. Not supported, and why says why.
Layout fields are on Layout options. Font files are on Fonts.