mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Graph NG: make series color easy to clear (#27778)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
FieldColor,
|
||||
FieldColorMode,
|
||||
FieldConfigProperty,
|
||||
identityOverrideProcessor,
|
||||
PanelPlugin,
|
||||
standardEditorsRegistry,
|
||||
@@ -11,6 +11,16 @@ import { Options } from './types';
|
||||
|
||||
export const plugin = new PanelPlugin<Options, GraphCustomFieldConfig>(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<Options, GraphCustomFieldConfig>(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,
|
||||
|
||||
Reference in New Issue
Block a user