Trend: Filter out time fields (#68504)

This commit is contained in:
Nathan Marrs 2023-05-15 15:59:45 -07:00 committed by GitHub
parent 516cb30c36
commit 5a5860256f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
import { PanelPlugin } from '@grafana/data';
import { Field, FieldType, PanelPlugin } from '@grafana/data';
import { commonOptionsBuilder } from '@grafana/ui';
import { defaultGraphConfig, getGraphFieldConfig } from '../timeseries/config';
@ -20,6 +20,7 @@ export const plugin = new PanelPlugin<PanelOptions, PanelFieldConfig>(TrendPanel
settings: {
isClearable: true,
placeholderText: 'First numeric value',
filter: (field: Field) => field.type === FieldType.number,
},
});