code: function(domain, range, value) {
  
              var domainSpan = domain[1] - domain[0];
              var rangeSpan = range[1] - range[0];
              return (((value - domain[0]) / domainSpan) * rangeSpan + range[0]) || 0;
          }
docs: Return the `value` from the `domain` interval scaled to the `range` interval.