crisbeto / angular-svg-round-progressbar

Angular module that uses SVG to create a circular progressbar
https://crisbeto.github.io/angular-svg-round-progressbar/
MIT License
742 stars 173 forks source link

Changing Percent Complete Dynamically #94

Closed stephenlane closed 8 years ago

stephenlane commented 8 years ago

Hi There,

Just wondering is it possible to change the percent complete dynamically, trying it this way and it doesn't work

<div round-progress max="100" current=""{{mon_sleeps_p}}"" color="#45ccce" bgcolor="#eaeaea" radius="50" stroke="7" semi="false" rounded="false" clockwise="true" responsive="false" duration="800" animation="easeInOutQuart" animation-delay="0" offset="0"></div>

Thanks,

Stephen

crisbeto commented 8 years ago

Yes, it's possible. You have a syntax error in the current attribute: you should remove the curly braces ({{ }}):

<div round-progress max="100" current="mon_sleeps_p" color="#45ccce" bgcolor="#eaeaea" radius="50" stroke="7" semi="false" rounded="false" clockwise="true" responsive="false" duration="800" animation="easeInOutQuart" animation-delay="0" offset="0"></div>
stephenlane commented 8 years ago

Excellent thank you was driving me crazy :)

crisbeto commented 8 years ago

Also a tip: you don't have to specify all of the attributes. The example in the readme is only there to showcase them, but if they're not specified, they'll fall back to the defaults.

stephenlane commented 8 years ago

Excellent :) much appreciated