Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CultureInfo should be CultureInfo.InvariantCulture #6

Open
auyargicoglu opened this issue Aug 3, 2022 · 0 comments
Open

CultureInfo should be CultureInfo.InvariantCulture #6

auyargicoglu opened this issue Aug 3, 2022 · 0 comments

Comments

@auyargicoglu
Copy link

I've used PieChart component for my blazor webassembly project. Shortly, this library is a very useful, simple and easy to understand library which can be integrated to your projects in a very short time. But there is one important issue I really want to take attention. The UI components are drawn using Blazor Renderer, which makes the build process through elements and attributes given as strings. The problem may arise here, if you are not using invariant culture info, formatting according to some other language produces unrecognizable SVG initialization stings. The console logs given below show the apparent cause, be careful about the usage of commas and dots:

Working Version: (Invariant Culture)
blazor.webassembly.js:1 d=M 0.85 0 A 0.85 0.85 0 0 1 0.85 0 L 0 0
blazor.webassembly.js:1 d=M 0.85 0 A 0.85 0.85 0 0 1 0.85 0 L 0 0
blazor.webassembly.js:1 d=M 0.85 0 A 0.85 0.85 0 0 1 0.85 0 L 0 0

Not Working Version: (A culture which formats doubles using commas instead of dots)
blazor.webassembly.js:1 d=M 0,85 0 A 0,85 0,85 0 0 1 0,85 0 L 0 0
blazor.webassembly.js:1 d=M 0,85 0 A 0,85 0,85 0 0 1 0,85 0 L 0 0
blazor.webassembly.js:1 d=M 0,85 0 A 0,85 0,85 0 0 1 0,85 0 L 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant