Sign in to follow this  
GSilva

Scaling Numbers

Recommended Posts

A Business Analyst request me to develop a graphic to show numbers like:

 

1,500,500 = 1,500M

250,000 = 0,250M

2,500 = 0,002M

 

I tried: chart.setNumberScaleValue("1000000,1000,1000");, but the first number was not supported; its very big.

 

I tried: chart.setNumberScaleValue("100000,1000,1000");, almost give me properly number, but not all numbers went to the right side of the comma.

 

I suggest to support that feature. ;)

Edited by GSilva

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Could you please confirm once, whether you have modified FusionCharts JavaScript code to apply number scaling for the values by using "setNumberScaleValue()" function?

 

Please note that you can set the scale values for the chart by using "numberScaleValue" and "numberScaleUnit" attributes in the <chart> element of your XML data of the chart.

 

For more information on "Number Scaling", please follow the link below:

http://docs.fusioncharts.com/charts/contents/?AttDesc/Number_Scaling.html

 

Hope this helps!

 

Looking forward to your valuable response.

Share this post


Link to post
Share on other sites

I din't changed fcharts's javascript code.

 

I'm developing in java. A code snipet:

 

Chart chart = new Chart();

// chart.setNumbersuffix("%");

chart.setNumberScaleValue("1000,1000,1000");

chart.setNumberScaleUnit("K,M,B");

chart.setFormatnumberscale("1");

chart.setForceDecimals("1");

chart.setNumberprefix(moeda.getSimbolo() + " ");

chart.setDecimals("3");

chart.setDecimalseparator(",");

chart.setThousandseparator(".");

chart.setExportAction("download");

chart.setExportAtClient("0");

chart.setExportEnabled("1");

chart.setExportHandler(ChartsUtil.EXPORT_HANDLER_SERVLET);

chart.setCaption(title);

chart.setSubcaption(subtitle);

chart.setShowlegend("1");

 

If the library would have support for something like:

 

chart.setNumberScaleValue("1000000,1,1000");

chart.setNumberScaleUnit("M,M,B");

 

may resolve my problem, because de number 250,000 will be showed as 0,250M, and 3,000,000 as 3,0M.

 

That's right?

 

I think the graphic side (flash) parameter for scaling doesn't support big numbers (one million, for example). Today,

the parameter data type may be an "int", when "long" type would be the properly data type.

 

Hi,

 

Could you please confirm once, whether you have modified FusionCharts JavaScript code to apply number scaling for the values by using "setNumberScaleValue()" function?

 

Please note that you can set the scale values for the chart by using "numberScaleValue" and "numberScaleUnit" attributes in the <chart> element of your XML data of the chart.

 

For more information on "Number Scaling", please follow the link below:

http://docs.fusionch...er_Scaling.html

 

Hope this helps!

 

Looking forward to your valuable response.

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

I am afraid, we do not support the methods similar to "setNumberScaleValue()" and "setNumberScaleUnit()" to set the number scale values and units.

 

AS I have mentioned in the previous post, you need to set the attributes "numberScaleValue" and "numberScaleUnit" in the <chart> element of your chart's XML/JSON data for setting number scale values and units for the chart.

 

Hope this helps!

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
Sign in to follow this