[英]d3.layout.pack text inside circle overrides other text in other circle
I'm using d3.layout.pack to place circles inside other main circle, like in http://mbostock.github.io/d3/talk/20111018/pack.html 我正在使用d3.layout.pack将圆放置在其他主圆内,例如http://mbostock.github.io/d3/talk/20111018/pack.html
But i have larger texts inside circles that override the circle and can override another text in a near circle: 但是我在圆圈内有较大的文本可以覆盖该圆圈,并且可以覆盖附近的圆圈中的另一个文本:
The solutions I can think are: 我能想到的解决方案是:
But that ideas doesn't satisfy me too much. 但是那个想法并不能使我满意。 I will like for example in this case to place the two smaller balls more spaced. 例如,在这种情况下,我想将两个较小的球更隔开。
Can d3.layout.pack
do some more interesting avoiding the circle overriding? d3.layout.pack
可以做一些更有趣的事情来避免圆圈被覆盖吗?
Can I use d3.layout.force
for this? 我可以d3.layout.force
使用d3.layout.force
吗? Any ideas? 有任何想法吗?
I would suggest as one of possibilities the answer to question 'Text along a circle in a D3 circle pack layout' : 我可能会提出以下问题的答案之一: “在D3圆圈包布局中沿圆圈的文字” :
Basically, the idea
is to draw labels along the circles instead in the centers of the circles. 基本上,这个idea
是沿着圆形而不是圆形的中心绘制标签。 Also, you might consider drawing only some of the labels at the time - those that belong to small circles maybe should be omitted. 另外,您可能会考虑当时仅绘制一些标签-属于小圆圈的那些标签可能应该省略。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.