Nick135 / googlechartsharp

Automatically exported from code.google.com/p/googlechartsharp
0 stars 0 forks source link

URL is damaged using float values on swedish computers #11

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using float[] with decimal values in chart
2. Swedish (or other) i18n rules

Expected output is for example 1.10, but as we Swedes use the decimal
separation character "," (instead of the expected ".") the output is "1,10".

This screws up the URL as each float value is separated with a ",".

Using the 1.0.2 version (sourcecode) on Windows XP with .NET 3.5 (Swedish).

Fixed the problem by adding a .Replace(',','.') call after the ToString.
ChartData.cs, line 122:

chartData += value.ToString().Replace(',', '.') + ",";

However, unsure how to fix this to be culture non-specific.

Cheers!

Original issue reported on code.google.com by ca.breng...@gmail.com on 16 Sep 2008 at 8:12

GoogleCodeExporter commented 8 years ago
Had the same problem for with the decimal separation character.(Denmark)
I changed the culture instead, to avoid others simular problems if any:
Like this:
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");

Original comment by jakob...@gmail.com on 4 Nov 2008 at 11:40

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Issue #13 addresses the same issue. But a better fix ;)

http://code.google.com/p/googlechartsharp/issues/detail?id=13

I consider this issue closed using the same fix.

Original comment by ca.breng...@gmail.com on 10 Nov 2008 at 5:01