adder the slider functionality for the graph