I am using svg.js to create circles with text inside and centered I was able to do that
let draw = SVG('main');
// this is for the text
draw.plain(ele.ticket_id).attr({
x: posX,
y: posY,
fill: '#fff',
'alignment-baseline': 'central',
'text-anchor': 'middle'
})
.font({
size: Number((radius/2) * .5).toFixed(2)
});
// and this creates the circle
circle.animate(500, 'quadIn').attr({
fill: '#f06',
id: element.ticket_id,
class: element.status,
cx: posX,
cy: posY
});
But I am unsure how to wrap the circle or the text with an a tag so it should be clickable. I don't see any examples in the svg.js documentation.