Базовые элементы circle rect line


http://tutorials.jenkov.com/svg/symbol-element.html

 

 

circle

r

 

fill

 





rect

r

 

fill

 





text

r

 

fill

 

x

 

y

 





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")
        ;

image

x

 

y

 
canvas.append("svg:image") 
        .attr("transform","translate("+[ x-20,y-20 ]+")") 
        .attr('width', 40)
        .attr('height', 40)
        .attr("xlink:href", "Icons/" + picName)
;