【发布时间】:2022-01-01 04:15:04
【问题描述】:
我正在尝试将文本放在由 d3js 创建的圆圈内,我该怎么做?
const svg = d3.select("#circle").append("svg").attr("width", 300).attr("height", 300)
const text = ['Team']
svg.append('circle')
.attr('cx', 100)
.attr('cy', 75)
.attr('r', 35)
.attr('stroke', '#41778D')
.attr('stroke-width', 5)
.attr('fill', '#ffffff');
svg.append('circle')
.attr('cx', 100)
.attr('cy', 75)
.attr('r', 27)
.attr('stroke', '#41778D')
.attr('fill', '#ffffff');
【问题讨论】:
标签: javascript d3.js