to find the center of a path you can use the code posted here and set the text-align attribute to center


var centroid = path.centroid(d),
    cenX = centroid[0],                //coordinates x of each path
    cenY = centroid[1];                //coordinates y of each path

Where path is the variable containing you path elements

Related Query

More Query from same tag