slider updates the graph