You are relying on this interval to update your graph after the zoom selection ends. If you remove this setInterval, your graph wont be updated