Skip to main content

Overview

Drill-down behavior is configured on each metric in the Databrain app (Settings > Actions > Drill Down). When you embed a dashboard using the <dbn-dashboard> or <dbn-metric> web component, drill-down works automatically — no additional code is required from the embedding application. Users can click data points in embedded charts to drill into deeper levels of detail, just as they would in the Databrain app. The embedded component handles query generation, level navigation, and breadcrumb display internally.

What You Can Customize

While drill-down behavior is inherited from the metric configuration, there are several aspects developers can control in the embedded context.

Theming Drill Breadcrumbs

The breadcrumb navigation that appears when a user drills into a chart can be styled using the theme property on your embedded component:
const theme = {
  drillBreadCrumbs: {
    fontFamily: "Inter, sans-serif",
    fontColor: "#333333",
    activeColor: "#007bff"
  }
};
<dbn-dashboard
  token="your-guest-token"
  dashboard-id="your-dashboard-id"
  theme={JSON.stringify(theme)}
/>
PropertyTypeDescription
fontFamilystringFont family for breadcrumb text
fontColorstringColor of inactive breadcrumb items
activeColorstringColor of the currently active breadcrumb level

Disabling Full-Screen View

Drill-down is also available in the full-screen metric view. If you want to hide chart settings in full-screen (which includes drill configuration), use:
<dbn-dashboard
  token="your-guest-token"
  dashboard-id="your-dashboard-id"
  is-hide-chart-settings
/>

Row-Level Security and Drill Down

Regular Drill Down

When a user drills into a data point, the system generates a new query with additional WHERE filters for the clicked dimension value. These queries respect existing row-level security (RLS) policies set through the guest token’s clientId. For example, if the guest token restricts data to tenant_id = 'acme', and a user drills from Region to Country by clicking “West”, the generated query includes both filters:
WHERE tenant_id = 'acme' AND region = 'West'

Cross-Dashboard Drill Down

When Cross Dashboard Drill Down is enabled, clicking a dimension applies that value as an RLS condition to all other metrics on the dashboard. This mechanism:
  • Uses the same RLS pipeline as tenant-based security
  • Stacks on top of existing RLS conditions (does not replace them)
  • Is automatically cleared when the user clicks the drilled dimension again
This means multi-tenant security is preserved throughout drill interactions — a user can never see data outside their tenant scope, regardless of how they drill.

Performance Considerations

Each drill level triggers a new database query. Keep these guidelines in mind when designing drill-down experiences for embedded dashboards:
  • Limit drill depth to 3-4 levels for most use cases. Deeper hierarchies increase query count and may degrade perceived performance.
  • Table drill-down removes GROUP BY from the query and returns individual rows matching the drilled filter. This can produce large result sets on high-cardinality datasets. Consider using non-table chart types for drill levels with potentially many rows.
  • Cross-dashboard drill triggers re-queries for all visible metrics on the dashboard simultaneously. The drilled filter is applied to every metric’s query — for best results, ensure metrics on the same dashboard share common dimension columns. Dashboards with many metrics will generate many concurrent queries.
  • Enable caching in Workspace Settings to reduce repeated query execution when users drill back up and then re-drill the same path.

Supported Chart Types

Drill-down is available on embedded metrics that use these chart types:
  • Table, Line, Step
  • Bar and Bar Stack (horizontal and vertical)
  • Combo (single-scale and multi-scale)
  • Area and Stacked Area
  • Pie, Doughnut, Rose
  • Histogram, Scatter, Bubble
  • Waterfall (including V2), Network, Tree map
  • Bullet chart
Drill-down is not available for Boxplot, Funnel, Gauge, Geo maps, Horizontal Stack Table, Pivot, Sankey, Single Value, and Time Series visualizations. For full configuration instructions, see the Drill Down platform guide and Cross Dashboard Drill Down guide.