Shifting datapoints in line chart

I have line chart with 10 points in x axis and y axis is variable. That thing what I need is - when I have (for example) points to x=3 it is moving to the end of chart (x=10). But when there are 10 values (x is in the end of chart) I need to remove first datapoint at x=1 and all datapoints shift to left and new value write at position of x=10. I could not figure out how to do that, I have idea but it was working weird. Thanks for some ideas.