@nidhipathak002,
When x-values are not passed to dataPoints, it’ll assign the x-value based on the number of dataPoints. As you are performing shift operation every second, x-value doesn’t get incremented. Incrementing the x-value manually along with the y-value and passing it to dataPoint should work fine in your case.
____
Shashi Ranjan
Team CanvasJS