+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "PanelTypeChangedHandler"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++

## PanelTypeChangedHandler type

### PanelTypeChangedHandler type

Called before a panel is initialized. Allows panel inspection for any updates before changing the panel type.

<b>Signature</b>

```typescript
export declare type PanelTypeChangedHandler<TOptions = any> = (panel: PanelModel<TOptions>, prevPluginId: string, prevOptions: any) => Partial<TOptions>;
```
<b>Import</b>

```typescript
import { PanelTypeChangedHandler } from '@grafana/data';
```
