             .attr('y', (d, i)-> i * rect_h + rect_h + offset_t)
 
         # Add text element for maximum value.
-        domain_max = geomap.private.domain[geomap.private.domain.length - 1]
         max_text = geomap.properties.format(domain_max)
         if domain_max < max_val
-            max_text = '> ' + max_text
+            if domain_max > domain_min
+                max_text = '> ' + max_text
+            else
+                max_text = '< ' + max_text
 
         sg.append('text')
             .text(max_text)

            if geomap.private.domain.length > 2
                min_text = geomap.properties.format(min_val)
            else
                min_text = '< ' + min_text

        # Hacky way to update already existing legend text element with min val.
        min_val_idx = colorlist.length - 1

            .attr('y', offset_t)

        # Determine text to display for min val by default use domain_min.
        min_text = geomap.properties.format(domain_min)
        if min_val < domain_min
            # When a threshold scale is used domain_min is the upper bound of
