Hi,
I am trying out the new Generic JavaScript View (2.12.0) and I am having diffculties generating the SVG Image in the output port.
I am guessing the code to fetch the svgElement is incorrect?
//Make an SVG Container var svgContainer = d3.select("body").append("svg") .attr("width", 200) .attr("height", 200); //Draw the Rectangle var rectangle = svgContainer.append("rect") .attr("x", 10) .attr("y", 10) .attr("width", 50) .attr("height", 100);
#var svgElement = document.getElementById("mySVG"); var svgElement = document.getElementsByTagName('svg')[0]; return (new XMLSerializer()).serializeToString(svgElement);
I have attached my workflow.