updating d3 graphs based on user input