FitToView moving instead of scaling

Nov 10, 2016 at 5:18 PM
Greetings, I'm trying to remake FitToView so that it doesn't zoom out with new data but moves to the right instead. I've made my own algorithm but then noticed the FollowWidthConstraint which basically does the same thing. The problem with both of them is that when the moving actually happens the LineGraph gets moved more than the axis and then moves as it should. Because of this the whole graph constantly glitches left and right (add a FollowWidthConstraint to the FitToView constraints in the viewport2d to see for yourself). How can you fix this?