d3.js - nvd3 insert a break in a line chart -
i using nvd3 linechart , looking way insert break in plotted line.
if have dataset 10 points need chart draw line connecting first 5 points , last 5 points not connecting points 5 , 6 ie
1-2-3-4-5 6-7-8-9-10
i have tried setting both chart.defined , line.defined = false point 5 results in no line connecting points 4, 5 , 6 ie
1-2-3-4 5 6-7-8-9-10
unfortunately have got standalone snippet of code involved in rendering chart - here 2 functions resulted in point 5 being rendered stand alone point:
chart = nv.models.linechart(); chart.defined(function (d,i) { if (i == 4){ return false; }else{ return true; } } } lines.defined(function(d,i){ if (i==4 ){ return false }else{return true} })
Comments
Post a Comment