如何使用svg.js在圆圈中添加链接或标记

如何使用svg.js在圆圈中添加链接或标记,svg,svg.js,Svg,Svg.js,我正在使用svg.js创建圆圈,圆圈内有文本并居中,我能够做到这一点 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-an

我正在使用svg.js创建圆圈,圆圈内有文本并居中,我能够做到这一点

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

但我不确定如何用标签将圆圈或文本包装起来,使其可以点击。我在svg.js文档中没有看到任何示例

好的,只是在元素中添加一个链接(此处为url)

到相应文档的强制链接:或对于3.0: