D3js: Automatic labels placement to avoid overlaps? (force repulsion)

前端 未结 6 1617
有刺的猬
有刺的猬 2020-11-27 11:28

How to apply force repulsion on map\'s labels so they find their right places automatically ?


Bostock\' \"Let\'s Make a Map\"

Mike

6条回答
  •  情深已故
    2020-11-27 12:03

    One option is to use a Voronoi Layout to compute where there is space between points. There's a good example from Mike Bostock here.

提交回复
热议问题