From 5477297d105900026a6df1f34df864901cb2cdbc Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Sat, 13 May 2023 00:10:31 +0100 Subject: [PATCH] [v9.5.x] Heatmap: Fix log scale editor (#68153) Heatmap: Fix log scale editor (#68132) (cherry picked from commit 4ee894b0bea4306bc171a16c0cc5f15fd799b414) Co-authored-by: Ryan McKinley --- packages/grafana-ui/src/options/builder/axis.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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,