handles domain, range, and legend differently for different datatypes