This post describes how to turn the barplot horizontal with d3.js. This can be handy when you have long labels. Note that you could consider building lollipop plot as well.
div
that will be modified by d3 later on.svg
area. It specify the chart size and its margin. Read more.