I created a svg using D3. However, it only shows up on the upper left conner of the screen, or been appended to another svg. Are there anyway I can move it using JavaScript? For
Using d3js + Jquery :
// svg design
var svg = d3.select("#chart").append("svg")
.attr("width", 200)
.attr("height", 200);
// svg repositioning
$("svg").css({top: 200, left: 200, position:'absolute'});
Or
// svg align center
d3.select("#chart").attr("align","center"); // thanks & +1 to chaitanya89
Live demo