import React from 'react'; import { FieldOverrideEditorProps, SelectableValue } from '@grafana/data'; import { HorizontalGroup, RadioButtonGroup, ScaleDistribution, ScaleDistributionConfig, Select } from '@grafana/ui'; const DISTRIBUTION_OPTIONS: Array> = [ { label: 'Linear', value: ScaleDistribution.Linear, }, { label: 'Logarithmic', value: ScaleDistribution.Logarithmic, }, ]; const LOG_DISTRIBUTION_OPTIONS: Array> = [ { label: '2', value: 2, }, { label: '10', value: 10, }, ]; export const ScaleDistributionEditor: React.FC> = ({ value, onChange, }) => { return ( { console.log(v, value); onChange({ ...value, type: v!, log: v === ScaleDistribution.Linear ? undefined : 2, }); }} /> {value.type === ScaleDistribution.Logarithmic && (