-
Notifications
You must be signed in to change notification settings - Fork 0
/
code.txt
27 lines (22 loc) · 1009 Bytes
/
code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
code of back up
//create screen space for svg drawing
const canvas = d3.select("body")
.append("svg")
.attr("width",500)
.attr("height",500);
const cirscle = canvas.append("circle")
.attr("cx",100)
.attr("cy",150)
.attr("r", 50)
.attr("fill","red");
const rect = canvas.append("rect")
.attr("width",100)
.attr("height",50)
.attr("fill","#999");
const line = canvas.append("line")
.attr("x1",100)
.attr("y1",150)
.attr("x2",200)
.attr("y2",250)
.attr("stroke","blue")
.attr("stroke-width",5);