<!DOCTYPE html>
<html>
<head>
<title>Practice</title>
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script>
</head>
<body>
将 div 链接到 js
<div id="svgpathSVGdata"></div>
D3.js 的开始
<script type="text/javascript">
var divElem = d3.select("#svgpathSVGdata");
设置画布
var svgcanvas = divElem.append("svg:svg")
.attr("width", 800)
.attr("height", 800);
目前它是颠倒的,我也希望将它移到更中央
svgcanvas.append("svg:path")
.attr("d","M -200,0 A200,200 0 0,0 500,0 L -200,0")
.style("stroke-width", 2)
.style("stroke", "steelblue")
.style("fill", "none");
</script>
</body>
</html>