legends min and max