You can call defined
directly on the dc created chart.
chart
.chart((c) ->
dc.lineChart(c)
.interpolate('linear')
.defined((d) ->
return !isNaN(d.y)
)
)
The condition !isNan(d.y)
can be anything you like that evaluates to true/false.
Note that the d
passed by defined
is a d3 object and is worth inspecting.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…