d3 / d3-plugins

[DEPRECATED] A repository for sharing D3.js V3 plugins.
https://github.com/d3/d3/wiki/Plugins
Other
1.81k stars 684 forks source link

Graph Rollup use node.id but index #160

Closed sunscheung closed 7 years ago

sunscheung commented 7 years ago

Hello, Im trying to get a graph like Graph Rollup. And I want to let node.id as link.source or link.target but index. I hope the d3-plugins of Graph Rollup can support it. My data.json:

{ "nodes": [ {"id": "n1","name": "node1", "group": "g1"}, {"id": "n2","name": "node2", "group": "g2"}, {"id": "n3","name": "node3", "group": "g1"}, {"id": "n4","name": "node4", "group": "g1"} ], "links": [ {"source": 'n1', "target": 'n2'}, {"source": 'n2', "target": 'n3'}, {"source": 'n2', "target": 'n4'}, ] }

mbostock commented 7 years ago

Please use Stack Overflow tag d3.js to ask for help. Although I make an effort to assist everyone that asks, I am not always available to provide help promptly or directly. Stack Overflow provides a better collaborative forum for self-help: tens of thousands of D3-related questions have already been asked there, and some answered questions may be relevant to you.

When asking for help, please include a link to a live example that demonstrates the issue, preferably on bl.ocks.org. It is often impossible to debug from code snippets alone. Isolate the issue and reduce your code as much as possible before asking for help. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response.

If you have a question about D3’s behavior and want to discuss it with other users, also consider the d3-js Google Group or joining the d3-js Slack.

Thank you! 🤗