mbostock/d3 — Issue #583: d3_svg_lineLinear — Allow null values for path points
Author: kitmonisit
Created: 2012-03-06 14:28:26+00:00
State: open

I'm working with data that sometime have holes in them. I think it would be useful to suppress those missing data. I made an attempt to do just that with the `linear` interpolator:

````javascript
function d3_svg_lineLinear(points) {
var i = 0,
n = points.length,
p = points[0],
path = [p[0], ",", p[1]];
while (++i < n) {
if (points[i][1]) {
path.push("L", (p = points[i])[0], ",", p[1]);
} else if (points[i+1][1]) {
path.push("M", (p = points[i+1])[0], ",", p[1]);
} else {
path.push("M", (p = points[i])[0], ",", 100);
}
}
return path.join("");
}
````

It works pretty well with just a `line` generator:

![Line](http://i.imgur.com/lIDCn.png)

But breaks with `area` generator:

![Area](http://i.imgur.com/sd06c.png)

I could give this a shot. Will it be feasible to begin work on this? I think that, for this to work with the `area` generator, several `area`s will need to be created, instead of just one.