(data)
| 3681 | function d3_svg_line(projection) { |
| 3682 | var x = d3_svg_lineX, y = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7; |
| 3683 | function line(data) { |
| 3684 | var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y); |
| 3685 | function segment() { |
| 3686 | segments.push("M", interpolate(projection(points), tension)); |
| 3687 | } |
| 3688 | while (++i < n) { |
| 3689 | if (defined.call(this, d = data[i], i)) { |
| 3690 | points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]); |
| 3691 | } else if (points.length) { |
| 3692 | segment(); |
| 3693 | points = []; |
| 3694 | } |
| 3695 | } |
| 3696 | if (points.length) segment(); |
| 3697 | return segments.length ? segments.join("") : null; |
| 3698 | } |
| 3699 | line.x = function(_) { |
| 3700 | if (!arguments.length) return x; |
| 3701 | x = _; |
nothing calls this directly
no test coverage detected