Geomap: hide legend for markers with single threshold (#38734) (#38738)

(cherry picked from commit f567bef0bf)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2021-08-31 22:58:32 -07:00
committed by GitHub
co-authored by Ryan McKinley
parent 742947f6c3
commit 5f7e249f40
@@ -46,8 +46,8 @@ export function MarkersLegend(props: MarkersLegendProps) {
}
const thresholds = color.field?.config?.thresholds;
if (!thresholds) {
return <div className={style.infoWrap}>no thresholds????</div>;
if (!thresholds || thresholds.steps.length < 2) {
return <div></div>; // don't show anything in the legend
}
return (