From f567bef0bf5eebc54f2391d3b0d5ffab8c3c53fe Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Mon, 30 Aug 2021 23:22:19 -0700 Subject: [PATCH] Geomap: hide legend for markers with single threshold (#38734) --- public/app/plugins/panel/geomap/layers/data/MarkersLegend.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/geomap/layers/data/MarkersLegend.tsx b/public/app/plugins/panel/geomap/layers/data/MarkersLegend.tsx index 0cd4ffde137..b2fec9723b6 100644 --- a/public/app/plugins/panel/geomap/layers/data/MarkersLegend.tsx +++ b/public/app/plugins/panel/geomap/layers/data/MarkersLegend.tsx @@ -52,8 +52,8 @@ export function MarkersLegend(props: MarkersLegendProps) { } const thresholds = color.field?.config?.thresholds; - if (!thresholds) { - return
no thresholds????
; + if (!thresholds || thresholds.steps.length < 2) { + return
; // don't show anything in the legend } return (