d3 shape code example Example: d3 line chart with shapes lineGenerator .defined(function(d) { return d !== null; });