Added D3 functionality copypasta'd from example