This post describes how to build a very basic streamgraph with d3.js. You can see many other examples in the streamgraph section of the gallery. Learn more about the theory of streamgraphs 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.path, using the d3.area() helper.