Graph updates when slider is moved