Thursday, 12 September 2013

marker size uniform in d3

marker size uniform in d3

i am creating marker on my force directed graph. in my force directed
graph i have lines or links of different thickness or stroke. because of
this the markers are getting created with different sizes. what i want is
to have uniform size of marker. here is my code for marker :
`svg.append('defs').append('svg:marker')
.classed("arrowhead",true)
.attr('id', 'arrowhead')
.attr('viewBox', '0 -5 40 40')
.attr('refX', "25")
.attr('markerWidth', 8)
.attr('markerHeight', 8)
.attr('orient', 'auto')
.append('svg:path')
.attr('d', 'M0,-5L10,0L0,5')
.attr('fill', 'black');`
how can i have marker with uniform size?? thanks in advance..

No comments:

Post a Comment