Come si crea un elemento SVG con JavaScript? Ho provato questo:Crea tag SVG con JavaScript
var svg = document.createElement('SVG');
svg.setAttribute('style', 'border: 1px solid black');
svg.setAttribute('width', '600');
svg.setAttribute('height', '250');
svg.setAttribute('version', '1.1');
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
document.body.appendChild(svg);
Tuttavia crea un elemento SVG con larghezza zero e altezza zero.
quale browser stai facendo questo con? –