Sha256: 11c5c667dfa4329a35b54a5504747ac89fbce70f5db40f3fc70f36b4bec3941d
Contents?: true
Size: 912 Bytes
Versions: 31
Compression:
Stored size: 912 Bytes
Contents
d3.svg.diagonal = function() { var source = d3_svg_chordSource, target = d3_svg_chordTarget, projection = d3_svg_diagonalProjection; function diagonal(d, i) { var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [p0, {x: p0.x, y: m}, {x: p3.x, y: m}, p3]; p = p.map(projection); return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3]; } diagonal.source = function(x) { if (!arguments.length) return source; source = d3.functor(x); return diagonal; }; diagonal.target = function(x) { if (!arguments.length) return target; target = d3.functor(x); return diagonal; }; diagonal.projection = function(x) { if (!arguments.length) return projection; projection = x; return diagonal; }; return diagonal; }; function d3_svg_diagonalProjection(d) { return [d.x, d.y]; }
Version data entries
31 entries across 31 versions & 2 rubygems