Ajustar texto ao elemento SVG (usando D3 / JS)
Eu quero escrever o texto dentro de um retângulo que eu crio da seguinte forma:
body = d3.select('body')
svg = body.append('svg').attr('height', 600).attr('width', 200)
rect = svg.append('rect').transition().duration(500).attr('width', 150)
.attr('height', 100)
.attr('x', 40)
.attr('y', 100)
.style('fill', 'white')
.attr('stroke', 'black')
text = svg.append('text').text('This is some information about whatever')
.attr('x', 50)
.attr('y', 150)
.attr('fill', 'black')
No entanto, como você pode verhttp://jsfiddle.net/Tmj7g/3/) o texto é cortado. Quaisquer maneiras bacanas de escrever um parágrafo dentro do retângulo svg criado? Obrigado,