我使用d3js在svg中创建圆圈。在每个圆圈中,我想放一些文字(一封信要具体)。我的问题是:如何使文本的中心与圆心相匹配?我的例子是“备注”:"m“的像素长度大于"e”:因此,如果我正确定位"e“,"m”就不会完全位于中间:(D载有这封信eval_x给出了半径中心x位置的计算公式g_.append("text")
.text ( fu
at eval (eval at <anonymous> (http://localhost:8080/house/polyfills.js:2782:1), <anonymous>:761:17) []
at eval (eval at <anonymous> (http://localhost:8080/house/vendor.js:14:1), <an
anonymous> (http://crm.dev:3000/js/vendor.js:71:1), <anonymous>:5946:21)
at domManip (eval at <anonymous(anonymous function) [as insertAfter] (eval at <anonymous> (http://crm.dev:3000/js/vendor.<em
_registerComponent (eval at <anonymous> (eval at <anonymous> (http://localhost:8080/js/app.js:1873:1):8080/js/polyfills.js:53:30) [<root>] at eval (eval at <anonymous> (http:
(eval at createNamedFn (eval at <anonymous> (http://192.168.33.10:7777/polyfills.js:2660:2)), <anonymous>:3:43)
at Observable.eval [as _subscribe] (eval at <anonymous> (http://192.168.33.10:7777/vendor.<