min/max x handles empty datasets