Embed Visualizations Using React SDK
GoodData.UI is a React-based JavaScript library for building responsive analytical applications. You can use GoodData.UI to embed your Visualizations and Dashboards inside your web applications.
You can copy pre-generated React code snippets from the Analytical Designer or from a Dashboard, see the following article sections for details.
With GoodData.UI you can do a lot more than just embed pre-generated code snippets into your web application. If you want to learn how to fully customize your embeded visualizations, see GoodData.UI documentation.
Prepare Environment For GoodData.UI
Before you can embed a visualization into your application, you need to first integrate the GoodData.UI React SDK into your application environment, follow the instructions in Integrate into an Existing Application. Ensure that you have covered the following steps:
- Install the necessary dependencies (Step 1)
- Set up Analytical Backend and integrate it into your application (Step 3)
- Solve Cross-Origin Resource Sharing (Step 4)
Embed Live Visualization
A live visualizations that reflects any changes you make to the visualization in your GoodData deployment. Note that only saved visualizations can be embedded as live visualizations.
Steps:
Open the visualization you want to embed.
Click the embed icon and select Embed as a live insight.
Configure the code.You can select the type of code, display/hide the title, or set a custom height.
Copy the code.
Disappearing Icon
In an embedded visualization, the embed icon is not visible.
Embed Permanent Visualization
A permanent visualizations that embeds the current version of the visualization and does not reflect any future changes made to the visualization in your GoodData deployment.
Steps:
Open the visualization you want to embed.
Click the embed icon and select Embed as a permanent insight.
Configure the code.You can select the type of code, include the insight configuration of colors/legend/axes/canvas, or set a custom height.
Copy the code.
Disappearing Icon
In an embedded visualization, the embed icon is not visible.
Embed Dashboards
Users must be workspace members to see the embedded dashboard.
Steps:
Open the dashboard you want to embed.
Click the … icon and select Embed.
The Embed dashboard dialog opens.
Switch to the React tab.
Copy the code.