Implemented the stacked generation in D3.