For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Embed Charts with an iframe

You can embed a chart into a web application with an iframe and specify settings such as height, width, refresh interval, and display theme.

Charts embedded within an iframe may be either:

  • Unauthenticated, in which case they are viewable by anyone.

  • Authenticated with a Verified Signature.

    Note

    Authentication with a Verified Signature is deprecated. The Embedding Charts SDK offers authentication through several authentication providers.

1

From the Dashboards page, select the dashboard containing the chart you wish to make embeddable. For instructions on navigating to dashboards, see Dashboards.

2

From the dashboard, click at the top-right of the chart to access its embedding information. Select Embed chart from the dropdown menu.

Note

If a chart is on a dashboard that has embedding enabled, the Embed Chart option is automatically enabled. Therefore, you can't select the Embed chart option for charts within dashboards that have embedding enabled.

3

If you have already enabled external sharing on the data source this chart uses, skip this step. If you haven't yet enabled embedding on the data source, you can do so now. Click the Configure external sharing link.

4
Embed unauthenticated chart
click to enlarge
5
6

Specify the fields on which chart viewers can filter data. By default, no fields are specified, meaning the chart cannot be filtered until you explicitly allow at least one field.

Alternatively, you can specify all the fields in your chart by selecting Allow all fields in the data source used in this chart.

To learn more about filterable fields, see Specify Filterable Fields.

7

Selecting the Iframe panel reveals the iframe embedding code and allows you to set refresh and display theme options.

8
  1. The refresh interval determines how often your chart refreshes with new data, if any, from your data source.

    If you are a free user, a new four-hour option is selected by default as the auto-refresh interval.

  2. You can select the Light or Dark display theme for your chart.

9

The iframe embedding code contains your chart's base URL and chart ID, as well as any options you have set.

10

You can edit the iframe code manually to set several other chart options, including height, width, and border radius. See Embedded Chart Options for more information about chart options.

After your iframe code is ready with any options you've set, you can place it in a web page to display your chart.

Rate this page