Skip to content Skip to sidebar Skip to footer

On Button Click Open A New Window And Draw A Large Circle With D3

This question has been answered before here: On button click open a new window and draw a circle with D3 But in the solution given by meetamit: http://jsfiddle.net/aj3g5tqg/3/ crea

Solution 1:

The svg element appended into the new window is not sized:

sampleSVG.append('svg')
    .attr('width', 500)
    .attr('height', 500) //<-- give the SVG some size
    .append("circle")
    .style("stroke", "gray")
    .style("fill", "red")
    .attr("r", 200)
    .attr("cx", 250)
    .attr("cy", 250)
    ...

Updated fiddle.

Post a Comment for "On Button Click Open A New Window And Draw A Large Circle With D3"