Docs Menu
Docs Home
/
Atlas Charts
/ /

Embed Charts with an iframe

On this page

  • Prerequisites
  • Procedure

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 your dashboard page, select the dashboard containing the chart you wish to make embeddable.

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.

  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.

Important

Using a Verified Signature for authentication is deprecated. Instead, refer to the Authenticated Embedding tab for instructions on securing your charts.

1

If Atlas Charts is not already displayed, click the Charts tab in the Atlas UI.

Atlas launches an instance of Charts linked to your project.

2

From your dashboard page, select the dashboard containing the chart for which you want to enable embeddings.

3

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

4

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

5
  1. Select the Verified Signature tab in the dialog box.

  2. Toggle Enable signed authentication access to On.

The HTML code that appears in the modal window shows the required parameters for sharing a chart with authentication enabled. To use this code, you must continue with the subsequent steps to enable authenticated access.

6

Click Embedding under the Development heading in the sidebar.

The Embedding page displays.

7

Note

You must be a Project Owner to access the Authentication Settings page. As a non-admin user, you can still use embedded charts, but you must get a key from a Project Owner.

Click the Authentication Settings tab.

The Authentication Settings tab displays.

8

Click the Generate New Key button to create a new embedding key. Store the key in a safe place.

Warning

If you generate a new key, any previous keys become invalid. Ensure that all the existing shared charts that use the old key are updated to use the new key.

9

Generating a verified signature to accompany data requests from shared charts with authentication enabled requires server-side code. The verified signature creates a payload by generating a HMAC from your embedding key, a timestamp, and identifying data from your chart. The verified signature is valid for a limited time period specified in your server-side code.

Code examples demonstrating how to generate a verified signature are available for the following languages and platforms:

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

Back

Embed a Chart