Slider of a point in a graph

can I make a slider to move a point in a graph. can the points move in a straight line?

thank you