Proper format for drawing polygon data in D3

前端 未结 3 1753
长情又很酷
长情又很酷 2020-12-09 04:33

I\'ve tried this different ways, but nothing seems to be working. Here is what I currently have:

var vis = d3.select(\"#chart\").append(\"svg\")
         .at         


        
3条回答
  •  一整个雨季
    2020-12-09 05:07

    are you trying to draw polygon shapes? - like this. http://bl.ocks.org/2271944 The start of your code looks like a typical chart - which would usually conclude something like this.

    chart.selectAll("line")
         .data(x.ticks(10))
       .enter().append("line")
         .attr("x1", x)
         .attr("x2", x)
         .attr("y1", 0)
         .attr("y2", 120)
    .style("stroke", "#ccc");
    

提交回复
热议问题