如何在点之间绘制单独的线
这是我的代码
index.html文件是
<!DOCTYPE html>
<html>
<head>
<title>The d3 test</title>
<style>
.grid .tick {
stroke: lightgrey;
opacity: 0.7;
}
.grid path {
stroke-width: 0;
}
.chart {
}
.main text {
font: 10px sans-serif;
}
.axis line, .axis path {
shape-rendering: crispEdges;
stroke: black;
fill: none;
}
circle {
fill: steelblue;
}
</style>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js">
</script>
</head>
<body>
<div class='content'>
<!-- /the chart goes here -->
</div>
<script type="text/javascript" src="scatterchart.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
而scatterplot.js是
var data = [
[2, 2], …Run Code Online (Sandbox Code Playgroud)