The set of options that you can use when both creating an EmbedSDK object or using EmbedSDK.createDashboard.

### Hierarchy

- SharedEmbedOptions
  - EmbedDashboardOptions

## Index

### Properties

- autoRefresh
- background
- baseUrl
- charts
- chartsBackground
- dashboardId
- filter
- getUserToken
- height
- heightMode
- maxDataAge
- preFilter
- showAttribution
- showTitleAndDesc
- theme
- width
- widthMode

## Properties

### Optional autoRefresh

autoRefresh: undefined | false | true

Inherited from SharedEmbedOptions.autoRefresh

Whether the embedded object should be automatically refreshed.

### Optional background

background: undefined | string

Inherited from SharedEmbedOptions.background

The background color to use for the embedded object.

If no background is provided, it will set a default background color based on the theme.

To control the background color using CSS and classes, set to `transparent`.

### baseUrl

baseUrl: string

Inherited from SharedEmbedOptions.baseUrl

The base url for your MongoDB EmbedSDK instance.

This should look something like: `https://charts.mongodb.com/charts-example-url-zdvkh`

### Optional charts

charts: Array<DashboardChartOption>

Embedding options to be passed to the embedded charts in the dashboard

### Optional chartsBackground

chartsBackground: undefined | string

Assign background colour for all charts in an embedded dashboard.

### dashboardId

dashboardId: string

The id for the dashboard you want to embed.

This can be found in the "Embed Dashboard" dialog.

### Optional filter

filter: PlainObject

Inherited from SharedEmbedOptions.filter

The filter to apply to the embedded chart or dashboard.

This expects an object that contains a valid query operators. Any fields referenced in this filter are expected to be allowed for filtering in the "Embed Chart" for each chart you wish to filter on or in the "Embed Dashboard" dialog if you are applying a filter on a dashboard.

### Optional getUserToken

getUserToken: undefined | (() => string | Promise<string>)

Inherited from SharedEmbedOptions.getUserToken

A function that returns a valid JWT that will be used to authenticate the user.

This function will be called when the embedded object is first rendered, and then successively when the SDK needs to refresh an invalid token.

See also getRealmUserToken

### Optional height

height: string | number

Inherited from SharedEmbedOptions.height

The height of the embedded object.

If no height is provided, it will default to stretching to the height of it's container. If a value is provided without units, it will be assumed to be pixels (px).

### Optional heightMode

heightMode: Scaling

Height behaviour of charts in an embedded dashboard.

- `'fixed'` Height of charts will remain the same as the dashboard.
- `'scale'` Height of charts will scale according to the container.

### Optional maxDataAge

maxDataAge: undefined | number

Inherited from SharedEmbedOptions.maxDataAge

How long in seconds data is considered fresh.

By default, staleness tolerance is 1 hour.

### Optional preFilter

preFilter: PlainObject

Inherited from SharedEmbedOptions.preFilter

The filter to apply as the first stage on the Data Source.

This expects an object that contains a valid query operators. Any fields referenced in this filter are expected to be allowed for filtering in the "Embed Chart" for each chart you wish to filter on or in the "Embed Dashboard" dialog if you are applying a filter on a dashboard.

If filtering is required on a dynamic field defined via a Lookup, Calculated or Query Bar, then `filter` is appropriate property to set.

### Optional showAttribution

showAttribution: undefined | false | true

Inherited from SharedEmbedOptions.showAttribution

Whether to show the MongoDB attribution logo.

By default, this is set to `true`

### Optional showTitleAndDesc

showTitleAndDesc: undefined | false | true

Display the dashboard title and description.

### Optional theme

theme: Theme

Inherited from SharedEmbedOptions.theme

The color scheme to apply.

If the theme is set to 'dark' and you have specified a custom background color, you should ensure that your background color has appropriate contrast.

### Optional width

width: string | number

Inherited from SharedEmbedOptions.width

The width of the embedded object.

If no width is provided, it will default to stretching to the width of it's container. If a value is provided without units, it will be assumed to be pixels (px).

### Optional widthMode

widthMode: Scaling

Width behaviour of charts in an embedded dashboard.

- `'fixed'` Width of charts will remain the same as the dashboard.

- `'scale'` Width of charts will scale according to the container.

Generated using TypeDoc