MCPcopy Create free account
hub / github.com/jipegit/OSXAuditor / diagonal

Function diagonal

d3-3.2.8/d3.js:7372–7382  ·  view source on GitHub ↗
(d, i)

Source from the content-addressed store, hash-verified

7370 d3.svg.diagonal = function() {
7371 var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;
7372 function diagonal(d, i) {
7373 var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
7374 x: p0.x,
7375 y: m
7376 }, {
7377 x: p3.x,
7378 y: m
7379 }, p3 ];
7380 p = p.map(projection);
7381 return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
7382 }
7383 diagonal.source = function(x) {
7384 if (!arguments.length) return source;
7385 source = d3_functor(x);

Callers 1

diagonal-test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected