score:1

I think it would be easier to insert svg paths rather than rects or circles. It's pretty flexible and you'll be able to add just about any shape you can think of to the force graph.

The following code draws a star. http://jsfiddle.net/UkeMS/

enter image description here

<svg>
    <path  d="
        m 100 100
        l 23 12
        l -4 -26
        l 19 -19
        l -27 -4
        l -11 -23
        l -12 23
        l -27 4
        l 19 19
        l -4 26
        l 24 -12
    "/>
</svg>

Just remember to declare the paths using relative coordinates with lowercase letters (as above) as opposed to absolute coordinates using uppercase letters.


Related Query