Question: svg has no width or height?
Answer: SVG is not like HTML, where elements expand to fit their children. SVG is like the <canvas> element. You have to make sure it either explicitly (or implicitly) has a size. You have not specified width or height attributes for your <svg> element, so they are both defaulting to "100%".