From b10d415569dc8de78a56d549085d84e0ceae9d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Farkas?= Date: Wed, 3 May 2023 10:34:29 +0200 Subject: [PATCH] grafana-data: improved field-config docs (#67696) --- packages/grafana-data/src/types/dataFrame.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/grafana-data/src/types/dataFrame.ts b/packages/grafana-data/src/types/dataFrame.ts index 639a3770b76..b46e912a5f0 100644 --- a/packages/grafana-data/src/types/dataFrame.ts +++ b/packages/grafana-data/src/types/dataFrame.ts @@ -29,12 +29,14 @@ export enum FieldType { */ export interface FieldConfig { /** - * The display value for this field. This supports template variables blank is auto + * The display value for this field. This supports template variables blank is auto. + * If you are a datasource plugin, do not set this. Use `field.value` and if that + * is not enough, use `field.config.displayNameFromDS`. */ displayName?: string; /** - * This can be used by data sources that return and explicit naming structure for values and labels + * This can be used by data sources that need to customize how values are named. * When this property is configured, this value is used rather than the default naming strategy. */ displayNameFromDS?: string;