diff --git a/packages/grafana-ui/src/options/builder/axis.tsx b/packages/grafana-ui/src/options/builder/axis.tsx index 6b940e0736c..2a728eff2e7 100644 --- a/packages/grafana-ui/src/options/builder/axis.tsx +++ b/packages/grafana-ui/src/options/builder/axis.tsx @@ -150,6 +150,7 @@ const LOG_DISTRIBUTION_OPTIONS: Array> = [ */ export const ScaleDistributionEditor = ({ value, onChange }: StandardEditorProps) => { const type = value?.type ?? ScaleDistribution.Linear; + const log = value?.log ?? 2; return ( <>
@@ -160,7 +161,7 @@ export const ScaleDistributionEditor = ({ value, onChange }: StandardEditorProps onChange({ ...value, type: v!, - log: v === ScaleDistribution.Linear ? undefined : value.log ?? 2, + log: v === ScaleDistribution.Linear ? undefined : log, }); }} /> @@ -169,7 +170,7 @@ export const ScaleDistributionEditor = ({ value, onChange }: StandardEditorProps { onChange({ ...value,