Piechart - percentage value display based on multi language

TeeChart for Javascript for the HTML5 Canvas

Piechart - percentage value display based on multi language

Postby 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?
SenSeo
Newbie
Newbie
 
Posts: 71
Joined: Wed Mar 09, 2016 12:00 am

Re: Piechart - percentage value display based on multi language

Postby 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
Marc
Site Admin
Site Admin
 
Posts: 831
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona

Re: Piechart - percentage value display based on multi language

Postby Yeray » Tue Aug 23, 2016 10:53 am

Hello,

Just for reference, note I've just posted a workaround to this issue here:
viewtopic.php?f=18&t=16212&p=72081#p72081
Best Regards,

ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image ImagePlease read our Bug Fixing Policy
Yeray
Site Admin
Site Admin
 
Posts: 8241
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia


Return to Javascript / HTML5

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest