小编use*_*665的帖子

绘制连接数据点的线

如何在点之间绘制单独的线

这是我的代码

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)

html javascript svg function d3.js

1
推荐指数
1
解决办法
4385
查看次数

标签 统计

d3.js ×1

function ×1

html ×1

javascript ×1

svg ×1