snowPu / ngx-beautiful-charts

Angular Library to create beautiful data charts
https://snowpu.github.io/ngx-beautiful-charts/
GNU General Public License v3.0
60 stars 3 forks source link

Slice size is cut with the angleMod calculation #12

Closed Vitomir2 closed 3 years ago

Vitomir2 commented 3 years ago

Dear Sukanya,

I really like your project and I want to use it into mine. However, I already implemented it, but there is a small problem when the parents are only 2 and they are separated, e.g., 70% to 30%. You will see it in my example with the Bus and Train slices.

I think the problem comes from the calculation of this line - 76: const angleMod = (angle > 180 ) ? 360 - angle : angle; in the sunburst component.

Can you tell me how I can fix this or if you can do it ? Thank you in advance!

Here I attach a screenshot.

Best regards, Vitomir

snowPu commented 3 years ago

Hey @Vitomir2 :)

Thank you for writing to me about the issue.

Could you update the npm library and try again? It should be fixed :)

Vitomir2 commented 3 years ago

Hey @snowPu :)

Thank you for your response and fast fixing! It works pretty well now and my circle (or part of circle) is filled.

Best regards, Vitomir