line chart refactored to use d3.nest