css - Why is an svg:text just not displaying? -
css - Why is an svg:text just not displaying? -
i must missing obvious, can't <text>
show up. see http://jsfiddle.net/ydalh/ html + css
<svg style="width: 320px; height: 200px; top: 0px; left: 0px; position: relative;"> <g class="depth"> <g class="children"> <rect class="child" x="99" y="0" width="47" height="30"> <text dy=".75em" x="105" y="6">primary</text> </rect> <rect class="child" x="90" y="0" width="8" height="30"> <text dy=".75em" x="96" y="6">master</text> </rect> <rect class="parent" x="90" y="0" width="56" height="30"></rect> </g> </g> </svg>
based on http://bost.ocks.org/mike/treemap/
in svg don't nest text elements within graphical elements, must have similar to:
svg .append("rect") .append("text");
but need:
svg.append("rect"); svg.append("text");
css svg d3.js
Comments
Post a Comment