axis = function(data, line, circles) {
let smallest
let top
data.forEach(function(section){
if(!smallest || smallest > section.top - section.bottom) {
smallest = section.top - section.bottom
top = section.bottom + (smallest/2) - 1
}
})
line
.attr('y1', height/2).attr('y2', height/2)
.attr('opacity', '0')
.transition()
.duration(500)
.ease(d3.easeCircle)
.attr('y1', y(top)).attr('y2', y(top))
.attr('opacity', '0.8')
circles
.attr("cy", y(top))
.attr('opacity', '0')
.transition()
.delay(500)
.duration(300)
.ease(d3.easeCircle)
.attr('opacity', '0.8')
}