Emilio

for color scale numbers

Recommended Posts

Hello,

I'm trying to format the maxValues found in the color range object.  I'd like them to include commas as thousands separators.  If I supply the values pre-formatted (with commas), the map gives me unexpected results. 

Please check out my fiddle.  Specifically, I'd like the maxValues 1470 and 7042 to have comma seperators.

Thanks,

Emilio

Share this post


Link to post
Share on other sites

Hi Emilio,

 

FusionCharts formats number scale by default to display values like 1000 as 1K. You can disable the number formatting by setting the attribute "formatNumberScale" to "0", which will display 1000 as 1,000 on the chart. This will also disable the number formatting of the color range values as well. Please refer to the modified fiddle : https://jsfiddle.net/hq58mt2j/

 

Please note : This will also show the values in the tooltip as 1,000 along with the entity names. So explicitly setting the "toolText" attribute is not required for all the data objects.

Check the "Portland, OR" entity data object in the provided fiddle without the "toolText" attribute, displaying the tooltip with value as 1,460 since formatNumberScale is disabled.
{
            "displayValue": "1,460",
            "id": "820",
            //"tooltext": "Portland, OR<br>1,460",
            "value": "1460"
}

Please check the documentation link for further reference to number formatting feature of FusionCharts : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/number-format#enable-disable-automatic-formatting-of-numbers

For configuring the thousand or decimal separator, refer : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/number-format#customize-thousand-and-decimal-separator

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now