Strange behaviour for connectgaps

Following the ticket on github github.com/plotly/plotly.js/issues/1454#issuecomment-285375254

Look at http://codepen.io/anon/pen/LWxByB
Reading at https://plot.ly/javascript/reference/#scatter-connectgaps a gaps is “{nan} or missing values” so i was expecting a gaps at x=3 for the trace2.

Can anyone point me to the right solution to make the line not connected in case of discontinuity? Obviously with plotly setting, without cycling the entire dataset searching for discontinuity and manually adding a null value.

Thank you

1 Like

Something like http://codepen.io/etpinard/pen/wJJxqV might be a good start?

No because, as stated into the documentation, I was expecting a gap also on missing value. Not only on null value.
I would know how to trigger this behaviour on plotly in order to have a gap also for x=3 on trace2 of my original example

I think @ricky did a pretty good job at explaining what gaps mean for plotly.js here. I’m not sure how to explain it better. My apologies.

The best I can offer is that the tool for making gaps is inserting nulls, so that if the spacing of data is what determines the gaps for your case, then you probably do need to modify your input data so that it’s displayed as desired.

thank you for the explanation.
I’ll follow your recommendation