In some countries, commas are used as decimal separators and dots are used as thousand separators. Therefore, you can't directly enter formatted numbers in chart XML, as this would create confusion - because FusionCharts won't know what convention you are following. To enter formatted numbers in chart XML, first you have to define the formatting convention that you wish to use. If you enter formatted numbers without defining the formatting convention, you'll get an error message. FusionCharts provides two attributes inThousandSeparator and inDecimalSeparator, using these, you can directly enter numbers with your choice of thousand and decimal separators. Consider the XML below: |
<chart inThousandSeparator='.' inDecimalSeparator=',' formatNumberScale='0'> <set label='John' value='420.315,43' /> <set label='Mary' value='295.345,98' /> <set label='Tom' value='523.323,76' /> </chart> |
In the XML (above), we have entered the numbers in non-standard convention - i.e., we have used dot as the thousand separator and comma as the decimal separator (as followed in some European countries). |
As you can see, FusionCharts has interpreted the numbers correctly and has automatically converted them to standard format. If you want the chart to display values in non conventional format - you have to use thousandSeparator and decimalSeparator attributes. |
<chart inThousandSeparator='.' inDecimalSeparator=',' thousandSeparator='.' decimalSeparator=',' formatNumberScale='0'> |