Skip to Content

Component Options

Turn on the v2 embed design

Give an embedded dashboard the v2 cards, filters and menus with two attributes.

Add ui-version="v2" and embed-flags to <dbn-dashboard>. Both are needed.

<dbn-dashboard
  token="GUEST_TOKEN"
  dashboard-id="DASHBOARD_ID"
  ui-version="v2"
  embed-flags='{"embed_ui_v2_master":true}'
></dbn-dashboard>
  • ui-version="v2" loads the v2 styles and design tokens. Alone, it does not change the look of any part.
  • embed-flags picks the parts that get the v2 look. embed_ui_v2_master: true turns on all of them.
  • A flag without ui-version="v2" changes nothing.
  • ui-version defaults to legacy.

<dbn-metric> has no ui-version. The v2 design is for <dbn-dashboard> only.

Turn on one part at a time

Leave out embed_ui_v2_master and name the parts you want:

<dbn-dashboard
  token="GUEST_TOKEN"
  dashboard-id="DASHBOARD_ID"
  ui-version="v2"
  embed-flags='{"embed_ui_v2_filters":true}'
></dbn-dashboard>
FlagTurns on
embed_ui_v2_masterEvery part below
embed_ui_v2_primitivesButtons, inputs and other shared parts
embed_ui_v2_metric_cardsThe metric card design
embed_ui_v2_filtersThe filter bar design. Always turns on embed_ui_v2_primitives too.
embed_ui_v2_charts_chromeChart toolbar and menus
embed_ui_v2_create_metricThe create metric flow
embed_multi_hop_joinsMore than one join in the embedded metric builder. Not part of embed_ui_v2_master. Works with both designs.

Drill into any field (enable-adhoc-drill) and cross filtering (enable-cross-filter) live on the v2 card. They need embed_ui_v2_metric_cards. See Drill and cross-filter switches.

The names in the Embed dialog

The Embed dialog in Databrain prints these attributes for you.

Dialog settingChoicesAttributes it prints
AppearanceDon’t specify, Use saved theme, Light, Dark, Systemcolor-scheme, and theme-name for a saved theme. Works with both designs.
DesignCurrent, v2 (beta)v2 (beta) adds ui-version="v2", embed-flags='{"embed_ui_v2_master":true}', enable-adhoc-drill="true" and enable-cross-filter="true". Dashboard snippets only.

The v2 chart engine

The chart engine draws the chart marks. It is a separate switch from the design. An embed uses the current chart engine until it opts in.

Any of these turns on the v2 chart engine:

SwitchWhere
ui-version="v2"On a <dbn-dashboard>
data-dbn-ui="v2"On the element or a parent element
?dbnCharts=v2In the page URL

data-dbn-ui="v2" changes the chart engine only. It does not give you the v2 cards, filters or menus. Use ui-version and embed-flags for that.

The URL switch is saved in localStorage (@dbn:chartsV2) and stays for later visits:

ValueResult
?dbnCharts=v2v2 chart engine
?dbnCharts=v1Current chart engine. Wins over every other switch, including ui-version="v2".
?dbnCharts=autoClears the saved value. The attributes decide again.

The engine choice is page wide. When one v2 embed is on a page, every embed on that page draws with the v2 chart engine.

If something goes wrong

  • The look did not change. Check that both ui-version="v2" and embed-flags are on the element.
  • A snippet has data-dbn-ui="v2" but the old look. That snippet is from an older Databrain build. Add ui-version and embed-flags.
  • Charts stay on the old engine after you add ui-version. A saved v1 wins. Open the page once with ?dbnCharts=auto.

Next: Set dashboard options.