You need to add attributes for
preserveAspectRatio and
viewBox, which only have effect on
svg,
symbol,
image,
marker,
pattern, and
view elements. The values for the
viewBox should reflect the size of the picture.
- $('#picture', svg.root()).attr('preserveAspectRatio', 'xMinYMin meet').
- attr('viewBox', '0 0 100 50');
See the SVG specification for more details (part 7 in v1.1).