I think this is what you need. I'm basically hiding the segment when the x-axis is different
``` https://jsfiddle.net/dt5zLgay ```