Ajustar texto en el elemento SVG (usando D3 / JS)
Quiero escribir texto dentro de un rectángulo que creo de la siguiente manera:
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')
Sin embargo, como se puede ver (http://jsfiddle.net/Tmj7g/3/) el texto se corta. ¿Alguna forma ingeniosa de escribir un párrafo dentro del rectángulo svg creado? Gracias,