better JavaScript!

prevents overlapping bars on SVG plot