Piechart - percentage value display based on multi language

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
SenSeo
Newbie
Newbie
Posts: 71
Joined: Wed Mar 09, 2016 12:00 am

Piechart - percentage value display based on multi language

Post by SenSeo » Thu Aug 11, 2016 4:54 pm

We have created a pie chart and decimal values are assigned to pie chart for chart generation . The problem is that the decimal number format is not changed when I switch from one language to another language. For example the value should change and display on segment from 4.5 to 4,5(German language)


chart1.data.values = [a1, a2, a3];
chart1.data.labels = [a1.toLocaleString(), a2.toLocaleString(), a3.toLocaleString()];

Also the label value is not changed based on language setting. I used javascript function "toLocalString()" for formatting decimal/number values based on culture.

Is there any way to format the number and display it on chart based on multilanguage?

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Piechart - percentage value display based on multi language

Post by Marc » Mon Aug 22, 2016 11:57 am

Hello,

We're just checking to offer an improvement here. TeeChart does a toFixed() decimal length on display values. ToFixed is not compatible with LocaleString (that doesn't respect the decimal places). I'll get back to this thread.

Regards,
Marc Meumann
Steema Support

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Piechart - percentage value display based on multi language

Post by Yeray » Tue Aug 23, 2016 10:53 am

Hello,

Just for reference, note I've just posted a workaround to this issue here:
http://www.teechart.net/support/viewtop ... 081#p72081
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply