fixed d3 graph so it does not stutter