(data)
| 3994 | function d3_svg_line(projection) { |
| 3995 | var x = d3_svg_lineX, y = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7; |
| 3996 | function line(data) { |
| 3997 | var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y); |
| 3998 | function segment() { |
| 3999 | segments.push("M", interpolate(projection(points), tension)); |
| 4000 | } |
| 4001 | while (++i < n) { |
| 4002 | if (defined.call(this, d = data[i], i)) { |
| 4003 | points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]); |
| 4004 | } else if (points.length) { |
| 4005 | segment(); |
| 4006 | points = []; |
| 4007 | } |
| 4008 | } |
| 4009 | if (points.length) segment(); |
| 4010 | return segments.length ? segments.join("") : null; |
| 4011 | } |
| 4012 | line.x = function(_) { |
| 4013 | if (!arguments.length) return x; |
| 4014 | x = _; |
no test coverage detected