src/data-canvas.js
function(originalCall) {
    var call = originalCall.slice(),  // make a copy
        type = call[0];
    if (type in CALLS_XY) {
      var xys = CALLS_XY[type];
      if (typeof(xys) == 'number') xys = [xys];
      xys.forEach(function(pos) {
        call[1 + pos] = xScale(call[1 + pos]);
        call[2 + pos] = yScale(call[2 + pos]);
      });
    }
    if (type in CALLS_WH) {
      var whs = CALLS_WH[type];
      if (typeof(whs) == 'number') whs = [whs];
      whs.forEach(function(pos) {
        call[1 + pos] *= xScaling;
        call[2 + pos] *= yScaling;
      });
    }
    return call;
  }
function(originalCall) {
    var call = originalCall.slice(),  // make a copy
        type = call[0];
    if (type in CALLS_XY) {
      var xys = CALLS_XY[type];
      if (typeof(xys) == 'number') xys = [xys];
      xys.forEach(function(pos) {
        call[1 + pos] = xScale(call[1 + pos]);
        call[2 + pos] = yScale(call[2 + pos]);
      });
    }
    if (type in CALLS_WH) {
      var whs = CALLS_WH[type];
      if (typeof(whs) == 'number') whs = [whs];
      whs.forEach(function(pos) {
        call[1 + pos] *= xScaling;
        call[2 + pos] *= yScaling;
      });
    }
    return call;
  }
function ( originalCall ) { var call = originalCall . slice ( ) , // make a copy type = call [ 0 ] ; if ( type in CALLS_XY ) { var xys = CALLS_XY [ type ] ; if ( typeof ( xys ) == 'number' ) xys = [ xys ] ; xys . forEach ( function ( pos ) { call [ 1 + pos ] = xScale ( call [ 1 + pos ] ) ; call [ 2 + pos ] = yScale ( call [ 2 + pos ] ) ; } ) ; } if ( type in CALLS_WH ) { var whs = CALLS_WH [ type ] ; if ( typeof ( whs ) == 'number' ) whs = [ whs ] ; whs . forEach ( function ( pos ) { call [ 1 + pos ] *= xScaling ; call [ 2 + pos ] *= yScaling ; } ) ; } return call ; }
These calls are more complex: arc arcTo ellipse TODO: clip calls outside of the source rectangle.
These calls are more complex : arc arcTo ellipse TODO : clip calls outside of the source rectangle .