From 6ee2bd4d29413882164db55833034985ad30b4e6 Mon Sep 17 00:00:00 2001 From: Esteban Beltran Date: Fri, 8 Dec 2023 15:23:55 +0100 Subject: [PATCH] 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> --- packages/grafana-data/src/types/panel.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/grafana-data/src/types/panel.ts b/packages/grafana-data/src/types/panel.ts index 0dd43826f6a..00baaae7686 100644 --- a/packages/grafana-data/src/types/panel.ts +++ b/packages/grafana-data/src/types/panel.ts @@ -72,10 +72,10 @@ export interface PanelData { } export interface PanelProps { - /** 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 { /** 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 { /** 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 */