Handle the event sent from embedded app.
Send message to embedded app.
Sets an event listener
the event you are subscribing to
the callback to be executed when the event is triggered
optional options object, can be used to customise when handler is called
the data of the embedded chart.
the current filter applied to the embedded chart.
the current highlight applied to the embedded chart.
the number of seconds before a chart or dashboard's data expires
the number of seconds a chart will wait before refreshing
the current theme applied to the chart or dashboard
whether auto refreshing is enabled
Triggers a refresh of the chart or dashboard (if it has been embedded).
a promise that resolves once the chart or dashboard updated its data
Removes an event listener
the event you are unsubscribing from
the event listener function you are unsubscribing from
optional options object used when addEventListener
Renders an embeddable item into the given container
.
This method should only be called once, and successive attempts to call render
will fail with an error.
a promise that will resolve once the item has successfully been embedded
Enable/Disable auto refreshing.
Sets the filter to apply to the embedded chart.
This expects an object that contains a valid query operators. Any fields referenced in this filter are expected to be whitelisted in the "Embed Chart" dialog for each Chart you wish to filter on.
Sets the highlight to apply to the embedded chart.
This is the exact same object that can be used in 'setFilter'. However, it doesn't support some query expressions
The highlight object to be applied to the chart
Set the number of seconds a chart or dashboard's data expires.
Set the number of seconds a chart will wait before refreshing.
The minimum refresh interval is 10 seconds. To disable, set the refresh interval to 0.
Sets the color scheme to apply to the chart or dashboard.
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.
Send message to embedded app.
Generated using TypeDoc
Chart
Allows you to interact and embed charts into your application.
const sdk = new EmbedSDK({ ... }); const chart = sdk.createChart({ ... }); // renders a chart chart.render(document.getElementById('embed-chart')); // dynamically set a filter chart.setFilter({ age: { $gt: 50 } });