Docs: Improve comments for panel props for plugins (#78596)

* Docs: Improve comments for panel props for plugins

* Update packages/grafana-data/src/types/panel.ts

Co-authored-by: Joseph Perez <45749060+josmperez@users.noreply.github.com>

* Update packages/grafana-data/src/types/panel.ts

Co-authored-by: Joseph Perez <45749060+josmperez@users.noreply.github.com>

---------

Co-authored-by: Joseph Perez <45749060+josmperez@users.noreply.github.com>
This commit is contained in:
Esteban Beltran 2023-12-08 15:23:55 +01:00 committed by GitHub
parent 5e03223ea9
commit 6ee2bd4d29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,10 +72,10 @@ export interface PanelData {
}
export interface PanelProps<T = any> {
/** ID of the panel within the current dashboard */
/** Unique ID of the panel within the current dashboard */
id: number;
/** Result set of panel queries */
/** Data available as result of running panel queries, includes dataframes and loading state **/
data: PanelData;
/** Time range of the current dashboard */
@ -84,19 +84,19 @@ export interface PanelProps<T = any> {
/** Time zone of the current dashboard */
timeZone: TimeZone;
/** Panel options */
/** Panel options set by the user in the panel editor. Includes both default and custom panel options */
options: T;
/** Indicates whether or not panel should be rendered transparent */
transparent: boolean;
/** Current width of the panel */
/** Current width of the panel in pixels */
width: number;
/** Current height of the panel */
/** Current height of the panel in pixels */
height: number;
/** Field options configuration */
/** Field options configuration. Controls how field values are displayed (e.g., units, min, max, decimals, thresholds) */
fieldConfig: FieldConfigSource;
/** @internal */
@ -105,16 +105,16 @@ export interface PanelProps<T = any> {
/** Panel title */
title: string;
/** EventBus */
/** Grafana EventBus */
eventBus: EventBus;
/** Panel options change handler */
/** Handler for options change. Invoke it to update the panel custom options. */
onOptionsChange: (options: T) => void;
/** Field config change handler */
/** Field config change handler. Invoke it to update the panel field config. */
onFieldConfigChange: (config: FieldConfigSource) => void;
/** Template variables interpolation function */
/** Template variables interpolation function. Given a string containing template variables, it returns the string with interpolated values. */
replaceVariables: InterpolateFunction;
/** Time range change handler */