diff --git a/public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx b/public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx index 43b19ecb1ec..feed3102f59 100644 --- a/public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import React, { useCallback, ReactNode } from 'react'; import cloneDeep from 'lodash/cloneDeep'; import { DataFrame, @@ -171,12 +171,17 @@ export const DefaultFieldConfigEditor: React.FC = ({ data, onChange, conf : undefined : (defaults as any)[item.path]; - const label = ( + let label: ReactNode | undefined = ( ); + // hide label if there is only one item and category name is same as item, name + if (categoryItemCount === 1 && item.category?.[0] === item.name) { + label = undefined; + } + return (