bootsoon / ng-circle-progress

A simple circle progress component created for Angular based on SVG Graphics.
https://bootsoon.github.io/ng-circle-progress/
MIT License
251 stars 86 forks source link

Extra space at the end of title/subtitles #80

Closed danieldanielecki closed 5 years ago

danieldanielecki commented 5 years ago

There's an added extra space after title and subtitle elements, which makes it not centered. It also doesn't look good if you have number with its corresponding % next to each other making there an unnecessary space. From source code point of view it's all about the <tspan> element. The problem is highlighted by red colour, the same applies to the demos examples where there's a an empty space between % number and the symbol '%', plus it's not centered as well. You can easily see it based on the demos, which have title and subtitle that the title text is more on the left side, instead of centered.

extra_space2 extra_space

ruimartins21 commented 5 years ago

Same problem here. Does someone know how to solve it? Thank you

bootsoon commented 5 years ago

Failed to find an elegant way to remove white spaces in a string within a tag in an Angular template.

preserveWhitespaces works for white spaces between tags but not those in a tag.

The only way to remove such white spaces is to remove all spaces from template in source code.

I'll remove the white spaces in the string in all tags if there's no other way to solve the issue.

Any help?

danieldanielecki commented 5 years ago

Line 439 starting from template: "\n <svg xmlns=\"http://www.w3.org/2000/svg\" onwards in index.js is the part where I tried to remove all the spaces, but still couldn't get it working. Is there any other part of the code you're talking about with the white spaces?

ruimartins21 commented 5 years ago

@bootsoon I can't get the result that I want. Could you fix it for us? Thanks in advance.

bootsoon commented 5 years ago

@ruimartins21 I'll release version 1.4.1 to fix #80 ASAP.

bootsoon commented 5 years ago

@danieldanielecki @ruimartins21 Please update to 1.4.1.

no-more-extra-space

danieldanielecki commented 5 years ago

Confirmed, working fine in the 1.4.1, thank you!

ruimartins21 commented 5 years ago

@bootsoon I just updated to version 1.4.1. Seems that the spacing issue was fixed but now the circle didn't load to the supposed percentage and stays at 0%. I reverted and it worked fine. There is any change that I need to make in the code after this update? Sorry for the inconvenience and keep up the good work.