http://tutorials.jenkov.com/svg/symbol-element.html
line
|
|
x
|
|
|
y
|
|
stroke-width
|
|
stroke
|
цвет линии |
|
stroke-dasharray="10, 5"
|
type |
line = d3.line().x(function(d) {return d[0];} ).y(function(d) { return d[1]} ) ;
canvas.append("path")
.attr("d", line([[0, 0], [getElemWidth(canvas), 0]]))
.attr("stroke-width", 4)
.attr("stroke", "#CDD5DE")
;
canvas.append("svg:image")
.attr("transform","translate("+[ x-20,y-20 ]+")")
.attr('width', 40)
.attr('height', 40)
.attr("xlink:href", "Icons/" + picName)
;