From 5f7e249f4032409a77e7f80bc330afde686892bd Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 1 Sep 2021 07:58:32 +0200 Subject: [PATCH] Geomap: hide legend for markers with single threshold (#38734) (#38738) (cherry picked from commit f567bef0bf5eebc54f2391d3b0d5ffab8c3c53fe) Co-authored-by: Ryan McKinley --- 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 099b121711f..b34a7f663c0 100644 --- a/public/app/plugins/panel/geomap/layers/data/MarkersLegend.tsx +++ b/public/app/plugins/panel/geomap/layers/data/MarkersLegend.tsx @@ -46,8 +46,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 (