Position circles on a horizontal axis without overlapping using force layout
问题 I would like to position circles on a d3 scale and relax them in such a way that they do not overlap. I know that this decreases accuracy, but that's okay for the type of chart that I would like to generate. This is my minimum (non-)working example: https://jsfiddle.net/wmxh0gpb/1/ <body> <div id="content"> <svg width="700" height="200"> <g transform="translate(50, 100)"></g> </svg> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.2.2/d3.min.js"></script> <script> var width =