Page 1 of 1

Piechart - percentage value display based on multi language

Posted: Thu Aug 11, 2016 4:54 pm
by 15677821
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?

Re: Piechart - percentage value display based on multi language

Posted: Mon Aug 22, 2016 11:57 am
by Marc
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

Re: Piechart - percentage value display based on multi language

Posted: Tue Aug 23, 2016 10:53 am
by yeray
Hello,

Just for reference, note I've just posted a workaround to this issue here:
http://www.teechart.net/support/viewtop ... 081#p72081