This post describes how to build a very basic stacked barplot with d3.js. You can see many other examples in the barplot section of the gallery. Learn more about the theory of boxplots in data-to-viz.com.
div that will be modified by d3 later on.
svg area. It specify the chart size and its
margin. Read more.
d3.stack() function is used to stack the
data: it computes the new position of each group on the Y
axis
d3.stack() can be used to create
a set of rect as for a normal barplot.