Interactive Demo
dbn-dashboard and dbn-metric.
Understanding the Configuration Layers
Settings are resolved from highest priority (top) to lowest priority (bottom). A higher-priority layer always wins when the same setting exists in multiple layers.chart-appearance vs custom-chart-settings field names differ. These two layers evolved independently and use different keys for overlapping concepts. See the Field Name Mapping table below for a cross-reference.Dashboard Component (dbn-dashboard)
The dashboard component displays a complete dashboard with multiple metrics and interactive features.
Required Properties
Display & Layout Options
Basic Display Controls
Basic Display Controls
kebab-menu-vertical | downloadJSON.stringify(...).Settings Icon Configuration
Settings Icon Configuration
"auto" | "auto-start" | "auto-end" | "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end"Download & Export Options
Download & Export Options
Advanced Configuration
Dashboard Options Object
Dashboard Options Object
options prop accepts a JSON object with the following properties:true inside the dashboard options object to enable it. This option applies to dbn-dashboard and does not change the UI Theming setting used by dashboards in the app."hidden" to suppress the message entirely. Options: "bottom" | "bottom-left" | "bottom-right" | "center" | "top" | "top-left" | "top-right" | "hidden"hide field hides the Adjust Spacing button from Customize Layout.padding shorthand (for example "16px", "12px 24px", "8px 12px 16px"). Applied as an inline style on the embed dashboard container..cta-primary, .cta-secondary, and .cta-tertiary, so they apply anywhere those classes are used in the embedded experience (for example dashboard action buttons and full-screen metric controls).Each variant supports optional string fields — pass fragments of CSS declarations (semicolon-separated), similar to inline style text:styles— base statehoverStyles—:hover:enabledactiveStyles—:activedisabledStyles—:disabled
Global Filter Options
Global Filter Options
Theme Configuration
Theme Configuration
Admin Theme Options
Admin Theme Options
JSON.stringify(...)."DD-MM-YYYY", "MM-DD-YYYY", "YYYY-MM-DD")."small" | "medium" | "large""floating" | "static""8px")."16px")."600")..dbn-metric-card-title)..dbn-metric-element-title). Use when element metrics should differ from cardTitle.color. Applied with !important when set..dbn-metric-card-description)..dbn-metric-element-description). Separate from cardDescription.color; applied with !important when set.name and an array of colors."Roboto")."#333333")."0.5px").header, label, and value objects. Each accepts fontFamily, fontSize, fontWeight, and fontColor."16px")."8px")."0 2px 8px rgba(0,0,0,0.1)")."#E0E0E0").Additional Dashboard Properties
JSON.stringify(...).JSON.stringify(...).Per-Metric Chart Settings
JSON.stringify(...). Refer to the Custom Chart Settings Reference section below for the complete schema.Internationalization
default | indEvent Handling
Custom Chart Click Action
data parameter depends on the chart type:Custom Messages
Custom Chart Settings Reference
Thecustom-chart-settings prop allows you to configure default values and control end-user editability for individual chart settings on each metric card. Every field follows the shape { defaultValue: <value>, canEdit: true | false }.
Field Name Mapping
Thechart-appearance prop (Priority 1) and custom-chart-settings prop (Priority 3) use different field names for overlapping concepts. Use this table to find the equivalent field when switching between layers.
Margins
Margins
Chart Colors
Chart Colors
Legend Settings
Legend Settings
Label Settings
Label Settings
Tooltip Settings
Tooltip Settings
Axis Settings
Axis Settings
Custom Settings - Axis & Grid
Custom Settings - Axis & Grid
Custom Settings - Formatting
Custom Settings - Formatting
Custom Settings - Title & Sub-header
Custom Settings - Title & Sub-header
Custom Settings - Single Value / KPI
Custom Settings - Single Value / KPI
Custom Settings - Bar & Column Charts
Custom Settings - Bar & Column Charts
Custom Settings - Combo Charts
Custom Settings - Combo Charts
Custom Settings - Zoom, Sort & Behavior
Custom Settings - Zoom, Sort & Behavior
Custom Settings - Markers
Custom Settings - Markers
Custom Settings - Linear Gauge V2
Custom Settings - Linear Gauge V2
Table Settings - Conditional Formatting
Table Settings - Conditional Formatting
Table Settings - Number & Time Formatting
Table Settings - Number & Time Formatting
Metric Component (dbn-metric)
The metric component displays a single metric with customizable appearance and interactions.
Required Properties
Display Properties
card | fullscreensvg | canvasBehavior Options
Download & Export
Download & Export
UI Controls
UI Controls
kebab-menu-vertical | downloadFilter Configuration
inside | outsideChart Appearance
Internationalization & Configuration
"fr", "es", "de").JSON.stringify(...). See the dashboard Internationalization section for the full schema.default | indJSON.stringify(...).JSON.stringify(...). See the dashboard Global Filter Options section for the full schema.JSON.stringify(...).JSON.stringify(...).Event Callbacks
Common Properties
These properties are available for both dashboard and metric components:Styling & Customization
No Data Handling
Date Picker Configuration
Usage Examples
- Basic Dashboard
- Customized Dashboard
- Basic Metric
- Advanced Metric
Frequently Asked Questions
How do I pass props dynamically or re-render components on prop changes?
How do I pass props dynamically or re-render components on prop changes?
Why are my custom colors not applying to charts?
Why are my custom colors not applying to charts?
How do I handle authentication token expiry?
How do I handle authentication token expiry?
How do I customize the appearance of filters and date pickers?
How do I customize the appearance of filters and date pickers?
Why is my dashboard not loading or showing blank?
Why is my dashboard not loading or showing blank?
- Invalid Token:
- Incorrect Dashboard ID:
- Missing Import:
- Network/CORS Issues:
How do I implement multi-tenant access control?
How do I implement multi-tenant access control?
How do I optimize performance for large dashboards?
How do I optimize performance for large dashboards?
How do I handle different screen sizes and responsive design?
How do I handle different screen sizes and responsive design?
How do I implement custom error handling and logging?
How do I implement custom error handling and logging?
How do I customize chart tooltips and legends?
How do I customize chart tooltips and legends?
Migration & Updates
Troubleshooting Quick Reference
Component Not Rendering
Component Not Rendering
- ✅ Check if
@databrainhq/plugin/webis imported - ✅ Verify token is valid and not expired
- ✅ Confirm dashboard-id/metric-id exists
- ✅ Check browser console for errors
- ✅ Ensure CORS is properly configured
Styling Issues
Styling Issues
- ✅ Use
JSON.stringify()for object props - ✅ Check CSS specificity conflicts
- ✅ Verify color format (use hex codes)
- ✅ Test with
!importantto identify overrides
Performance Issues
Performance Issues
- ✅ Enable canvas rendering for large datasets
- ✅ Disable unnecessary features (loaders, underlying data)
- ✅ Implement lazy loading for multiple components
- ✅ Use
shouldFitFullScreenfor better performance

