Adding D3 rendering features and legend layout.