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

Error: <path> attribute d: Expected number, "M NaN NaN A 27.5 2…". #136

Closed Eashwarswamy closed 6 years ago

Eashwarswamy commented 6 years ago

Hi,

I am trying to use the 'angular-svg-round-progressbar'

Not able to assign the JSON dynamic value to <round-progress [max]="{{item.number}}">

could you please help me, how do we config the dynamic values.

crisbeto commented 6 years ago

You're supposed to use it like this <round-progress [max]="item.number">.

Eashwarswamy commented 6 years ago

Hi Crisbeto,

Thanks for very quick help.

Issue is solved now, I am able to draw the circles now but max and current values are not displaying in the center of the circle.

Below is my actual code.

<round-progress [radius]="30" [rounded]="true" [stroke]="5" [max]="item.totJobs" [current]="item.jobsDead" [color]="item.colorHighlight" [background]="'#84F5D5'" >

Could you please let me know am I missing something here.

Or can have percentage value(ex: 60%) in the center of the circle (custom text).

Thanks, Eashwar

crisbeto commented 6 years ago

This module doesn't support rendering the text automatically on purpose, because text can be represented in a lot of different ways and it's relatively simple to do it yourself. You can check out the demo to see how it was done there: https://github.com/crisbeto/angular-svg-round-progressbar/tree/master/demo

Eashwarswamy commented 6 years ago

Hi Crisbeto,

Thanks again, It was my mistake I Just concentrated on the options.

I am able to display the content text inside the circle.

Hence I am closing the ticket.

jasonz1987 commented 6 years ago

i got the same error even i used [max].

Error: attribute d: Expected number, "M NaN NaN A 72.5 7…".

i also update the latest version 1.1.1,but it still doest not work.