In this case you have to change updateChart function as
var updateChart = function (yVal) {
xVal ++;
dps[xVal % dataLength].y = yVal;
dps[(xVal+gap) % dataLength].y = null;
chart.render();
};
And in your eventListner function you have to call updateChart(e.data);
I hope this will help you to implement required chart.