Setting domain and range for the color scale dynamically based on the input data