
* trying out api-extractor. * works with our setup of build. * wip. * changed the packages so it works better with the api-extractor. * Changes to make the api-extractor to work. * cleaned up the api-extractor config files. * added some more documentation. * added tsdoc-metadata to gitignore. * removed the generated docs (will do that in another PR). * added execute permission to script for generating dosc. * added so we will push generated docs to branch. * will clean packages_api on abort. * Fixed failing tests. * fixed formatting issue with typedoc comment. * temporarily disabled tslint rules about namespace until https://github.com/microsoft/rushstack/issues/1029 is resolved * temporary enabled bable namespaces. * updated build script. * updated script. * updated script with some colors. * changed to camelCase. * removed spacing. * Starting to add documentation guidelines. * added examples headline. * added menu options. * added parameters and return values. * Fixed merge error. * Added first version of auto-generated docs. * changed so we use the eslint ignore syntax. * changed to correct eslint ingnore comment. * fixed some spelling errors reported by codespell. * added script to generate docs in current folder. * updated api docs. * lerna bootstrap. * added eror to the ingore words list. * removed file that should be ignored. * updated locKFILE. * referenced the code comments guidelines. * updated packages. * updated deps. * updated the autogenerated dosc. * adding missing new line.
5.6 KiB
+++
-----------------------------------------------------------------------
Do not edit this file. It is automatically generated by API Documenter.
-----------------------------------------------------------------------
title = "PanelPlugin" keywords = ["grafana","documentation","sdk","@grafana/data"] type = "docs" draft = true +++
PanelPlugin class
Signature
export declare class PanelPlugin<TOptions = any> extends GrafanaPlugin<PanelPluginMeta>
Import
import { PanelPlugin } from '@grafana/data';
Constructors
Constructor | Modifiers | Description |
---|---|---|
constructor(panel) | Constructs a new instance of the PanelPlugin class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
angularPanelCtrl | any |
Legacy angular ctrl. If this exists it will be used instead of the panel | |
customFieldConfigs | FieldConfigEditorRegistry |
||
defaults | TOptions |
||
editor | ComponentClass<PanelEditorProps<TOptions>> |
||
noPadding | boolean |
||
onPanelMigration | PanelMigrationHandler<TOptions> |
||
onPanelTypeChanged | PanelTypeChangedHandler<TOptions> |
||
panel | ComponentType<PanelProps<TOptions>> |
Methods
Method | Modifiers | Description |
---|---|---|
setCustomFieldConfigs(registry) | ||
setDefaults(defaults) | ||
setEditor(editor) | ||
setMigrationHandler(handler) | This function is called before the panel first loads if the current version is different than the version that was saved.This is a good place to support any changes to the options model | |
setNoPadding() | ||
setPanelChangeHandler(handler) | This function is called when the visualization was changed. This passes in the options that were used in the previous visualization |
constructor(panel)
Constructs a new instance of the PanelPlugin
class
Signature
constructor(panel: ComponentType<PanelProps<TOptions>>);
Parameters
Parameter | Type | Description |
---|---|---|
panel | ComponentType<PanelProps<TOptions>> |
angularPanelCtrl property
Legacy angular ctrl. If this exists it will be used instead of the panel
Signature
angularPanelCtrl?: any;
customFieldConfigs property
Signature
customFieldConfigs?: FieldConfigEditorRegistry;
defaults property
Signature
defaults?: TOptions;
editor property
Signature
editor?: ComponentClass<PanelEditorProps<TOptions>>;
noPadding property
Signature
noPadding?: boolean;
onPanelMigration property
Signature
onPanelMigration?: PanelMigrationHandler<TOptions>;
onPanelTypeChanged property
Signature
onPanelTypeChanged?: PanelTypeChangedHandler<TOptions>;
panel property
Signature
panel: ComponentType<PanelProps<TOptions>>;
setCustomFieldConfigs method
Signature
setCustomFieldConfigs(registry: FieldConfigEditorRegistry): this;
Parameters
Parameter | Type | Description |
---|---|---|
registry | FieldConfigEditorRegistry |
Returns:
this
setDefaults method
Signature
setDefaults(defaults: TOptions): this;
Parameters
Parameter | Type | Description |
---|---|---|
defaults | TOptions |
Returns:
this
setEditor method
Signature
setEditor(editor: ComponentClass<PanelEditorProps<TOptions>>): this;
Parameters
Parameter | Type | Description |
---|---|---|
editor | ComponentClass<PanelEditorProps<TOptions>> |
Returns:
this
setMigrationHandler method
This function is called before the panel first loads if the current version is different than the version that was saved.
This is a good place to support any changes to the options model
Signature
setMigrationHandler(handler: PanelMigrationHandler): this;
Parameters
Parameter | Type | Description |
---|---|---|
handler | PanelMigrationHandler |
Returns:
this
setNoPadding method
Signature
setNoPadding(): this;
Returns:
this
setPanelChangeHandler method
This function is called when the visualization was changed. This passes in the options that were used in the previous visualization
Signature
setPanelChangeHandler(handler: PanelTypeChangedHandler): this;
Parameters
Parameter | Type | Description |
---|---|---|
handler | PanelTypeChangedHandler |
Returns:
this