ChartComponents icon indicating copy to clipboard operation
ChartComponents copied to clipboard

Charts not working when using component in Studio with language other than English

Open e-gallis opened this issue 3 years ago • 8 comments

Hi @TBag, I just opened your MSAPP file in a Power Apps Studio that is in French, and here's the result : BugCharts This is due to the fact that decimal number have a comma "," in French instead of a point "." in English. Meaning that the components works only in languages where the point "." is the decimal character. To workaround this issue, all decimal number inside your components SVGs should be formatted using: Text(... , "#.0", "en-US") This will ensure that the component will always use the point "." as the decimal character, thus making the component to work for all languages. I understand that's a lot of work so if you need any help, I'd be happy to assist... 😉

e-gallis avatar Feb 22 '22 13:02 e-gallis

Hello! Thanks for reporting this issue. Please feel free to make a PR for these changes and we can get it merged in.

TBag avatar Feb 22 '22 22:02 TBag

I d'ont know if this issue is fixed yet but I got the same style of graph as @e-gallis I think it is due to float numbers concatenated in svg. Numbers in svg uses dot as float number separator, whereas in french language, power apps uses semi column in float numbers. English people are not concerned because SVG and powerapps uses the dot for float numbers.

alexsolex avatar May 24 '23 19:05 alexsolex

Hi @alexsolex, I finished (just 5 minutes ago 😅) updating the code for all charts to fix this issue. @TBag is not even aware of it (yet). I'll send him an email probably tomorrow and see with him how to push this update... 😉 So the "internationalized" version of the component should be available in the coming days... 😊

e-gallis avatar May 27 '23 18:05 e-gallis

Good to know @e-gallis :) I was doing the same on my side + replacing some pieces of code for other ones like EncodeUrl(...) rather than Substitute(Substitute(Substitute(.... ;)

alexsolex avatar May 28 '23 06:05 alexsolex

@alexsolex can you contact me on LinkedIn (/in/egallis) so we can put this all together before we submit it to Todd? 😉

e-gallis avatar May 28 '23 10:05 e-gallis

Hi @e-gallis or @alexsolex, i'm just struggling with the same language issue. Meanwhile there is no updated code available on github. I tried to fix it myself but i'm not sure how to place the "Text(... , "#.0", "en-US")". So i wonder if one of you should give me a whole example line or maybe send me the updated code by pm? 😉

heyjoj avatar Jul 28 '23 06:07 heyjoj

Hi @heyjoj, I've fixed the issue. I'm just struggling to find some time to push the fix to Github. Seeing your message might just encourage me to do so... 😉

e-gallis avatar Jul 30 '23 07:07 e-gallis

Hi, that would be great 👍

heyjoj avatar Jul 31 '23 09:07 heyjoj