             if geomap.private.domain.length > 2
                 min_text = geomap.properties.format(min_val)
             else
-                min_text = '< ' + min_text
+                if domain_max > domain_min
+                    min_text = '< ' + min_text
+                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.
        domain_min = geomap.private.domain[0]
        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

        legend_h = 210
        offset_t = 4
        offset_y = geomap.properties.height - box_h

        # Reverse a copy to not alter colors array.
        colorlist = geomap.properties.colors.slice().reverse()
        rect_h = legend_h / colorlist.length

        # Determine minimum and maximum values of data domain.
        domain_min = geomap.private.domain[0]
        domain_max = geomap.private.domain[geomap.private.domain.length - 1]

        # Remove possibly existing legend, before drawing.
        geomap.properties.svg.select('g#legend').remove()

        lg = geomap.properties.svg.append('g')
