且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Angular/SVG-将数据传递到SVG

更新时间:2023-11-19 13:04:34

将值转换为字符串并使用属性绑定:

Convert the values to a string and use attribute binding:

[attr.stroke-dasharray]="donut.percent + ' ' + (100 - donut.percent)"

有关演示,请参见此stackblitz .