I've got a simple graph people can drag the position by drag and drop with the mouse. Currently it stops instantly as soon as the person stops touching but I want to achieve a similar effect as when you scroll through your phone. Keep the velocity as soon as the user lets go, decelerate until it stops.
How do I calculate this.