Links between data types in D3 JS library