> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# InsightView

> Render any saved GoodData visualization by reference with the InsightView component.

API reference: [InsightView()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) (function), [IInsightViewProps](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md) (interface)

The **InsightView component** is a generic component that renders visualizations created and saved in Analyze.

> **Note:**
>  The term 'insight' is an obsolete expression for 'visualizations' but is still employed within the SDK's components and functions.

You pass a reference to the saved visualization in the `insight` prop: an identifier string, or an [`ObjRef`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) created with `idRef`. GoodData Cloud and GoodData.CN reference objects by identifier. [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) loads the definition from the workspace, so the buckets, filters, and properties come from the saved visualization. Use the individual chart components, such as [Treemap](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/treemap/index.md), when you define the buckets in your code instead.

## [How it works](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#how-it-works)

1. [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) loads the saved visualization together with the workspace color palette, the user workspace settings, and the permissions of the current user.
2. Unless `executeByReference` is set, it adds the filters from the `filters` prop to the visualization's own filters.
3. It reads the visualization type from the saved visualization and renders the matching visualization.

| Type | Renders as |
| --- | --- |
| `area`, `bar`, `bubble`, `bullet`, `column`, `combo`, `combo2`, `dependencywheel`, `donut`, `funnel`, `heatmap`, `line`, `mekko`, `pie`, `pyramid`, `radar`, `sankey`, `scatter`, `treemap`, `waterfall` | The chart of that type. `combo` is the older combo chart. |
| `headline` | Headline |
| `table` | Pivot table. The new pivot table is used unless the workspace setting `enableNewPivotTable` is `false`. |
| `pushpin` | Geo pushpin chart. The new MapLibre-based implementation is used when the workspace setting `enableNewGeoPushpin` is `true`, which is the default on GoodData Cloud and GoodData.CN. With `false`, the legacy Mapbox-based chart renders, and it needs a Mapbox token. |
| `choropleth` | Geo area chart |
| `repeater` | Repeater |
| `xirr` | XIRR |

The saved types `tablenext` and `pushpinnext` render the new pivot table and the new geo pushpin chart directly. For any other type, [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) logs a warning to the console and shows the default error component with the "unknown visualization" message.

## [Loading and errors](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#loading-and-errors)

| Situation | What shows | Callbacks |
| --- | --- | --- |
| The visualization, color palette, settings, or permissions are loading | [`LoadingComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.loadingcomponent/index.md) (default: [`LoadingComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.loadingcomponent/index.md) from `@gooddata/sdk-ui`). The visualization area has zero height meanwhile. | None. `onLoadingChanged` doesn't fire for this phase. |
| The visualization is loaded | [`LoadingComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.loadingcomponent/index.md) | `onInsightLoaded` receives the saved visualization. It fires when a visualization with a different reference loads. It doesn't fire again when only `filters` change, but it does fire again after [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) remounts. |
| The visualization loads or executes its data | [`LoadingComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.loadingcomponent/index.md) | `onLoadingChanged` with `{ isLoading: true }`, then `{ isLoading: false }` |
| The visualization is rendered | The visualization | `onDataView`, `onExportReady`, and `pushData` when the visualization calls them |
| Loading the visualization or the permissions fails | [`ErrorComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.errorcomponent/index.md) (default: [`ErrorComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.errorcomponent/index.md) from `@gooddata/sdk-ui`) | `onError`. A load that a newer load replaced doesn't call it. |
| Loading the color palette or the settings fails | [`ErrorComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.errorcomponent/index.md) | None |
| The visualization fails to render or execute | [`ErrorComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.errorcomponent/index.md) | `onError`, then `onLoadingChanged` with `{ isLoading: false }` |

- The error component shows only when none of the visualization, color palette, settings, or permissions is still loading. Errors with a known error code get a localized message and description. Errors that aren't GoodData.UI SDK errors show the generic unknown-error message. SDK errors with no mapped code show the error code as the message.
- A visualization error is cleared as soon as the visualization starts loading again.
- The function passed to `onExportReady` uses the saved visualization's title as the export title when you don't set `title` in the export config.
- You can replace `onDrill`, `onError`, `onLoadingChanged`, `onExportReady`, `onDataView`, and `pushData` between renders. The visualization always calls the latest one. Replacing `onInsightLoaded` loads the visualization again.

## [When it reloads](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#when-it-reloads)

Reloading compares props by reference. Recreating the rendered visualization compares values.

| Change | Effect |
| --- | --- |
| `insight`, `filters`, `executeByReference`, or `onInsightLoaded` | Loads the visualization again and shows the loading component. |
| `backend` or `workspace` | Also loads the color palette, settings, and permissions again. A change of `executeByReference` also loads the permissions again. |
| The loaded visualization (apart from its properties), `filters`, the workspace settings, or `workspace` | Recreates the rendered visualization. |
| `config`, `drillableItems`, `colorPalette`, `execConfig`, or the visualization's properties only | Updates the rendered visualization in place. |

- Switching `locale` to a language the component hasn't loaded yet renders nothing until the translations load. After that, [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) mounts again and loads everything again.
- Keep `insight` (when it is an [`ObjRef`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md)), `filters`, and `onInsightLoaded` referentially stable, for example with `useMemo` and `useCallback`. A new reference, array, or function on every render loads the visualization again on every render.
- When a new load starts before the previous one finishes, the previous result is ignored. The request itself is not canceled.
- The loaded visualization definition, color palette, settings, and permissions are cached per workspace, so a reload doesn't always reach the backend. The cache keeps up to 20 visualizations per workspace for up to 5 workspaces. After you edit a saved visualization, call `clearInsightViewCacheForInsight(workspace, ref)` so that the next load (for example after a remount) fetches the new definition. Pass the same kind of reference that you pass to `insight`. See [Caching](#caching).

## [Configuration](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#configuration)

| Prop | What it does |
| --- | --- |
| `config` | Options for the visualization type, merged with the saved visualization's properties. For charts, top-level keys in `config` replace the saved values, so an object such as `legend` replaces the saved `legend` object as a whole. A few chart types adjust some keys afterwards; for example, pie and donut charts set `chart` themselves. The prop is typed loosely, so TypeScript doesn't check the options against the visualization type. |
| `filters` | Merged with the saved visualization's filters: attribute filters are combined; a date filter on the same date dataset or a measure value filter on the same measure replaces the saved one. Without `executeByReference`, the merge happens in the browser. With it, the backend merges them. See [Filters](#filters). |
| `executeByReference` | Asks the backend to compute the saved visualization by reference instead of sending the full execution definition. Use it only when the backend requires it. |
| `drillableItems` | Which parts of the visualization can be clicked. Clicks call `onDrill`. |
| `colorPalette` | Replaces the workspace color palette. Without it, the palette comes from the workspace styling settings. |
| `locale` | Locale for texts in the visualization. Without it, the locale comes from the user workspace settings. If that isn't a valid locale either, `en-US` is used. Values coming from the data aren't localized. |
| `showTitle` | `true` shows the saved visualization's title after loading. A string shows that string, also while loading. A function receives the loaded visualization and returns the title. |
| `TitleComponent` | Renders the title. It receives `title`. The default truncates the title to two lines. |
| `execConfig` | Execution settings passed to the visualization's execution. |

`config.mapboxToken` and `config.agGridToken` fall back to [`MapboxTokenProvider`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-geo/sdk-ui-geo.mapboxtokenprovider/index.md) (legacy Mapbox-based geo charts only) / `AgGridTokenProvider`, then to the workspace settings of the same names. `config.maxZoomLevel` falls back to the workspace setting.

## [Limits](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#limits)

- [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) needs a backend and a workspace, either in the `backend` and `workspace` props or from [`BackendProvider`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.backendprovider/index.md) and [`WorkspaceProvider`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.workspaceprovider/index.md). There is no explicit check. Rendering without a backend fails with a runtime error instead of showing the error component.
- For an unknown visualization type, the default error component shows, not your [`ErrorComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.errorcomponent/index.md), and `onError` isn't called.
- With `@gooddata/sdk-ui-ext/styles/css/main.css` imported, [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) takes the full height of its parent. Give the parent element an explicit height, as in the examples below.

## [Filters](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#filters)

To learn how to build the filters that you pass in the `filters` prop, see [Apply filters to visualizations](https://www.gooddata.ai/docs/gooddata-ui/latest/filters/filter-visual-components/index.md).

## [Caching](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#caching)

To render a visualization, [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) needs more than the visualization itself: the workspace color palette, the current user's workspace settings (including feature flags), and the user's permissions in the workspace. To avoid repeated requests, [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) caches this information together with the loaded visualization definitions. The cache is shared by all [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) components in the application and is kept per workspace: up to 20 visualization definitions for each workspace, for up to 5 workspaces. A cached value is used until you clear it, even when the saved visualization changes on the backend.

To drop the cached definition of one visualization, for example after you edit it, call `clearInsightViewCacheForInsight`. Pass the same kind of reference that you pass to `insight`. The new definition is fetched the next time an [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) loads that visualization, for example after it remounts.

To clear the cached visualization definitions, color palettes, and workspace settings at once, for example after logging out or when switching workspaces, call `clearInsightViewCaches`. It doesn't clear the cached user permissions.

```ts
import { clearInsightViewCaches, clearInsightViewCacheForInsight } from "@gooddata/sdk-ui-ext";
import { idRef } from "@gooddata/sdk-model";

clearInsightViewCacheForInsight("<workspace-id>", idRef("<visualization-id>"));
clearInsightViewCaches();
```

## [Structure](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#structure)

```tsx
import "@gooddata/sdk-ui-ext/styles/css/main.css";
import { InsightView } from "@gooddata/sdk-ui-ext";

<div style={{ height: 400, width: 600 }}>
    <InsightView
        insight="<visualization-id>"
        config={<chart-config>}
    />
</div>
```

```tsx
import "@gooddata/sdk-ui-ext/styles/css/main.css";
import { InsightView } from "@gooddata/sdk-ui-ext";
import { idRef } from "@gooddata/sdk-model";

<div style={{ height: 400, width: 600 }}>
    <InsightView
        insight={idRef("<visualization-id>", "insight")}
        config={<chart-config>}
    />
</div>
```

The options in `config` are different for each visualization type. [`InsightView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.insightview/index.md) expects the same configuration type as the matching React component.

## [Example](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#example)

```tsx
import "@gooddata/sdk-ui-ext/styles/css/main.css";
import { InsightView } from "@gooddata/sdk-ui-ext";

<div style={{ height: 400, width: 600 }}>
    <InsightView
        insight="<visualization-id>"
        config={{
            colors: ["rgb(195, 49, 73)", "rgb(168, 194, 86)"],
            legend: {
                enabled: true,
                position: "bottom"
            }
        }}
    />
</div>
```

## [Props](https://www.gooddata.ai/docs/gooddata-ui/latest/visualisations/insightview/#props)

| Prop | Type | Required | Description | Inherited from |
|------|------|----------|-------------|----------------|
| [`insight`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsinsight) | [`ObjRef`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) `\| string` | Yes | Reference to the insight to render. This can be specified by either object reference using URI or using identifier. For convenience it is also possible to specify just the identifier of the insight. | — |
| [`backend`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsbackend) | [`IAnalyticalBackend`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ianalyticalbackend/index.md) | No | Backend to work with. Note: the backend must come either from this property or from BackendContext. If you do not specify backend here, then the executor MUST be rendered within an existing BackendContext. | — |
| [`colorPalette`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropscolorpalette) | [`IColorPalette`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.icolorpalette/index.md) | No | Configure color palette to use for the chart. If you do not specify this, then the palette will be obtained from style settings stored on the backend. | — |
| [`config`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsconfig) | [`IChartConfig`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-charts/sdk-ui-charts.ichartconfig/index.md) `\|` [`IGeoConfig`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-geo/sdk-ui-geo.igeoconfig/index.md) `\|` [`IPivotTableConfig`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-pivot/sdk-ui-pivot.ipivottableconfig/index.md) `\|` [`PivotTableNextConfig`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-pivot/sdk-ui-pivot.pivottablenextconfig/index.md) `\| any` | No | When embedding insight rendered by a chart, you can specify extra options to merge with existing options saved for the insight. | — |
| [`drillableItems`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsdrillableitems) | [`ExplicitDrill`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.explicitdrill/index.md)`[]` | No | Configure chart drillability; e.g. which parts of the charts can be clicked. | — |
| [`ErrorComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropserrorcomponent) | `ComponentType<`[`IErrorProps`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ierrorprops/index.md)`>` | No | Component to render if embedding fails. | — |
| [`execConfig`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsexecconfig) | [`IExecutionConfig`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iexecutionconfig/index.md) | No | execConfig will provide the execution with necessary settings before initiating execution. | — |
| [`executeByReference`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsexecutebyreference) | `boolean` | No | Indicates that the execution to obtain the data for the insight should be an 'execution by reference'. Execution by reference means that the InsightView will ask analytical backend to compute results for an insight which is stored on the backend by specifying link to the insight, additional filters and description how to organize the data. Otherwise, a freeform execution is done, in which the InsightView will send to backend the full execution definition of what to compute. This distinction is in place because some backends MAY want to prohibit users from doing freeform executions and only allow computing data for set of insights created by admins. Note: the need for execute by reference is rare. You will typically be notified by the solution admin to use this mode. | — |
| [`filters`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsfilters) | [`IFilter`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ifilter/index.md)`[]` | No | Additional filters to apply on top of the insight. | — |
| [`LoadingComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsloadingcomponent) | `ComponentType<`[`ILoadingProps`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iloadingprops/index.md)`>` | No | Component to render while the insight is loading. | — |
| [`locale`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropslocale) | [`ILocale`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ilocale/index.md) | No | Locale to use for localization of texts appearing in the chart. Note: text values coming from the data itself are not localized. | — |
| [`onInsightLoaded`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsoninsightloaded) | `(insight:` [`IInsight`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iinsight/index.md)`) => void` | No | Called when the insight is loaded. This is to allow the embedding code to read the insight data. | — |
| [`showTitle`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsshowtitle) | `boolean \| string \| ((insight:` [`IInsight`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iinsight/index.md)`) => string \| undefined)` | No | In case this property is boolean it indicates that the title component will be rendered if specified in components properties. In case the property is string, this string must not be empty and will be shown as insight title. In case the property is a function, it should be implemented to take the loaded insight object and return modified title in string representation. | — |
| [`TitleComponent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropstitlecomponent) | `ComponentType<`[`IInsightTitleProps`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsighttitleprops/index.md)`>` | No | Component to render insight title. | — |
| [`workspace`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.iinsightviewprops/index.md#iinsightviewpropsworkspace) | `string` | No | Workspace where the insight exists. Note: the workspace must come either from this property or from WorkspaceContext. If you do not specify workspace here, then the executor MUST be rendered within an existing WorkspaceContext. | — |
| [`onDataView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md#ivisualizationcallbacksondataview) | [`OnDataView`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ondataview/index.md) | No | _(Alpha)_ Called when the visualization loads a DataView, i.e. it receives data from the backend. | [`IVisualizationCallbacks`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md) |
| [`onDrill`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md#ivisualizationcallbacksondrill) | [`OnFiredDrillEvent`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.onfireddrillevent/index.md) | No | Called when user triggers a drill on a visualization. | [`IVisualizationCallbacks`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md) |
| [`onError`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md#ivisualizationcallbacksonerror) | [`OnError`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.onerror/index.md) | No | Called when an error occurs while loading data for the visualization. | [`IVisualizationCallbacks`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md) |
| [`onExportReady`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md#ivisualizationcallbacksonexportready) | [`OnExportReady`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.onexportready/index.md) | No | Called when the visualization is ready to be exported. | [`IVisualizationCallbacks`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md) |
| [`onLoadingChanged`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md#ivisualizationcallbacksonloadingchanged) | [`OnLoadingChanged`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.onloadingchanged/index.md) | No | Called when loading status of the visualization changes - vis starts or stops loading | [`IVisualizationCallbacks`](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.ivisualizationcallbacks/index.md) |
