diff --git a/x-pack/legacy/plugins/lens/public/metric_visualization_plugin/metric_config_panel.tsx b/x-pack/legacy/plugins/lens/public/metric_visualization_plugin/metric_config_panel.tsx index 335dbb27556d8..b80235e69ba05 100644 --- a/x-pack/legacy/plugins/lens/public/metric_visualization_plugin/metric_config_panel.tsx +++ b/x-pack/legacy/plugins/lens/public/metric_visualization_plugin/metric_config_panel.tsx @@ -8,9 +8,11 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiForm, EuiFormRow } from '@elastic/eui'; import { State } from './types'; -import { VisualizationProps } from '../types'; +import { VisualizationProps, OperationMetadata } from '../types'; import { NativeRenderer } from '../native_renderer'; +const isMetric = (op: OperationMetadata) => !op.isBucketed && op.dataType === 'number'; + export function MetricConfigPanel(props: VisualizationProps) { const { state, frame } = props; const [datasource] = Object.values(frame.datasourceLayers); @@ -30,7 +32,7 @@ export function MetricConfigPanel(props: VisualizationProps) { layerId, columnId: state.accessor, dragDropContext: props.dragDropContext, - filterOperations: op => !op.isBucketed && op.dataType === 'number', + filterOperations: isMetric, }} />