Enable max and min for non-numbers but comparable types.

Please note that we are piggybacking d3 to do the max min logic