This is the code for Chapter 2, Figure 12 from D3.js in Action that creates rectangles with height based on the data bound to the selection. In this case, the rectangles all overlap each other because their X position is the same.