This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

API Reference@grafana/dataPanelTypeChangedHandler

PanelTypeChangedHandler type

PanelTypeChangedHandler type

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


export declare type PanelTypeChangedHandler<TOptions = any> = (panel: PanelModel<TOptions>, prevPluginId: string, prevOptions: Record<string, any>, prevFieldConfig: FieldConfigSource) => Partial<TOptions>;


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