Embed visualizations
To embed a visualization saved in Analyze, use the InsightView component.
Get the identifier of the visualization. Copy it from the browser’s address bar when the visualization is open in Analyze, or use the
Insightsconstants that catalog-export generates.Render
InsightViewwith that identifier, and import the styles of@gooddata/sdk-ui-extonce in your app:import { InsightView } from "@gooddata/sdk-ui-ext"; import "@gooddata/sdk-ui-ext/styles/css/main.css"; export function MyVisualization() { return ( <div style={{ height: 400 }}> <InsightView insight="<visualization-id>" config={{ colors: ["rgb(195, 49, 73)", "rgb(168, 194, 86)"], legend: { enabled: true, position: "bottom", }, }} /> </div> ); }InsightViewreads the backend and the workspace fromBackendProviderandWorkspaceProvider; pass thebackendandworkspaceprops to override them. See Integrate into an existing application.
For every prop of the component, see InsightView.
Related
Render any saved GoodData visualization by reference with the InsightView component.
Embed a saved visualization with the legacy gd-insight element, set its workspace, locale, title, filters, and size, and subscribe to its events.
Choose among a built-in dashboard embedded through an iframe, the Dashboard component, and a custom dashboard by comparing their integration, customization, and implementation trade-offs.
Configure drillableItems with header predicates to make visualization measures or attributes interactive and receive drill event context.
Apply custom themes to GoodData.UI dashboards and visualizations by wrapping your app in ThemeProvider.