diff --git a/packages/grafana-ui/src/components/OptionsUI/color.tsx b/packages/grafana-ui/src/components/OptionsUI/color.tsx index cf2c15a9811..c2b795f4311 100644 --- a/packages/grafana-ui/src/components/OptionsUI/color.tsx +++ b/packages/grafana-ui/src/components/OptionsUI/color.tsx @@ -22,7 +22,7 @@ export const ColorValueEditor: React.FC { @@ -41,7 +41,7 @@ export const ColorValueEditor: React.FC
diff --git a/packages/grafana-ui/src/index.ts b/packages/grafana-ui/src/index.ts index 74eacaee202..bbaef99deb6 100644 --- a/packages/grafana-ui/src/index.ts +++ b/packages/grafana-ui/src/index.ts @@ -10,4 +10,4 @@ export * from './themes'; export * from './slate-plugins'; // Exposes standard editors for registries of optionsUi config and panel options UI -export { getStandardFieldConfigs, getStandardOptionEditors } from './utils//standardEditors'; +export { getStandardFieldConfigs, getStandardOptionEditors } from './utils/standardEditors'; diff --git a/public/app/plugins/panel/graph3/module.tsx b/public/app/plugins/panel/graph3/module.tsx index 685b6627904..80ebd1fd16a 100644 --- a/public/app/plugins/panel/graph3/module.tsx +++ b/public/app/plugins/panel/graph3/module.tsx @@ -1,6 +1,6 @@ import { FieldColor, - FieldColorMode, + FieldConfigProperty, identityOverrideProcessor, PanelPlugin, standardEditorsRegistry, @@ -11,6 +11,16 @@ import { Options } from './types'; export const plugin = new PanelPlugin(GraphPanel) .useFieldConfig({ + standardOptions: [ + // FieldConfigProperty.Min, + // FieldConfigProperty.Max, + FieldConfigProperty.Unit, + FieldConfigProperty.DisplayName, + FieldConfigProperty.Decimals, + // NOT: FieldConfigProperty.Thresholds, + FieldConfigProperty.Mappings, + ], + useCustomConfig: builder => { builder // TODO: Until we fix standard color property let's do it the custom editor way @@ -19,8 +29,11 @@ export const plugin = new PanelPlugin(GraphPane id: 'line.color', name: 'Series color', shouldApply: () => true, - settings: {}, - defaultValue: { mode: FieldColorMode.Fixed }, + settings: { + allowUndefined: true, + textWhenUndefined: 'Automatic', + }, + defaultValue: undefined, editor: standardEditorsRegistry.get('color').editor as any, override: standardEditorsRegistry.get('color').editor as any, process: identityOverrideProcessor,