Default SVG position in d3.js
问题 I would like to understand why is my SVG positioned outside the SVG container element and not at the x:0/y0 coordinates by default ? CSS: Minimal (no CSS in case, only removed margin/padding on document body) Javascript: var svg = d3.select('div#map').append('svg:svg'); svg.append('svg:g') .append('svg:text') .text('Hello word') //.attr('x', 0) //.attr('y', 0) .attr('fill', 'red'); HTML: <div class="map" id="map"></div> The text element is there, filled with red and visible but is overflowing