D3 force layout: Straight line instead of curve for links (but only for some links)
问题 I have this D3 jsfiddle that produces following diagram: The only thing that bothers me about this diagram is that if there is only one link between two nodes, it is drawn as a curve. I think it would be much better if such links were just straight lines (arrow would be fine). Let's say between Microsoft and Amazon should be just a straight line (with arrow). The same between Oracle and Google, Sony and LG, etc. How to achieve this? 回答1: It's very easy. In your linkArc(d) method, just set the