raul.pimentel

How to show percentage

Recommended Posts

Hi,

 

I'm using FusionChart's Stacked Column 3D to display the number of requests per product per month.

 

Untitled-1_zpsd4b8d354.pngpost-55897-0-72264100-1378971779_thumb.png

 

From the picture above, let's take Jun 2013 as an example. The total number of requests is 348, with the AMS Device getting 169 of that number. Is it possible to show the number by percent (i.e. 48.56%) instead of 169? From what I know, that 348 is automatically computed by the chart via showSum='1'.

 

Thanks,

 

Poch

Share this post


Link to post
Share on other sites
Guest Rishab

Hi,

Please try using the attributes 'showPercentValues'  and 'showPercentInToolTip' of the <chart> element.

The above attributes are used to show percentage figures in data values of the chart and also to show percentage figures in tool tip.

 

For ex-

<chart showPercentValues='1' showPercentInToolTip='1' ...>

 

Share this post


Link to post
Share on other sites

 

Hi,

 

Please try using the attributes 'showPercentValues'  and 'showPercentInToolTip' of the <chart> element.

 

The above attributes are used to show percentage figures in data values of the chart and also to show percentage figures in tool tip.

 

For ex-

<chart showPercentValues='1' showPercentInToolTip='1' ...>

 

 

Hi Rishab,

 

It didn't work for me :( Here's the code bit:

 

 

 

strXML = strXML 
& "<chart palette='2' labelDisplay='Rotate' slantLabels='1' 
showBorder='0' bgColor='FFFFFF,FFFFFF' caption='Volume(Percentage) of Tasks by 
Product' shownames='1' showvalues='0' showSum='1' decimals='0' useRoundEdges='1' 
showPercentValues='1' showPercentInToolTip='1'>"

 

Did I do something wrong? :( Here's a screenshot of what shows:

 

post-55897-0-61321700-1379287854_thumb.png

Share this post


Link to post
Share on other sites
Guest Rishab

Hi,

Can you please let us know the FusionCharts version that you are using in your application.

At our end the code is working perfectly fine.

Please refer the attached sample and screenshot for more information.

 

post-47865-0-93333600-1379336636_thumb.jpg

StackedColumn.zip

Share this post


Link to post
Share on other sites

Hi Rishab,

 

Sorry this took a while :( We prioritized another project and we acquired a license for the new version of FusionCharts, and I'm glad to say that the percentage in the tooltip text is now working! Thank you so much!

 

Poch

Share this post


Link to post
Share on other sites

I'm sorry to resurrect this old thread, but my query is in line with my original one. The percentage values now show up in the tool tip. But is it possible to show both the value and percentage at the same time, or is that just one or the other?

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Please note that natively FusionCharts library does not provide any attributes,which could show both the numeric values as well as percentage values together as tooltip.

 

But, you could fulfill your requirement, by setting the values in both percentage as well as numeric, as string to the "toolText" attribute of the each set elements.

 

Ref. Code snippet:

 <set value='10000' toolText='10,000, 23.47%'/>

However, in this case "23.47%" needs to be calculated using your own utility function and FusionCharts will not allow you to implement any custom function for the same.

 

Hope this helps!

Share this post


Link to post
Share on other sites

@ Sashibhusan:

 

Tanks for this :) So, there's no automatic function for this? Nah, I guess the percentage will do :) Having both is nice to have but isn't really necessary for my internal clients anyway :)

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Yes, there is no automatic process to show both percentage as well as numeric values as tooltip.

 

However, if feasible, you can show the numeric values as data values (by setting showPercentValues='0') on the plot and on hovering over the mouse, show the percentage values of it as tool tip (by setting showPercentInToolTip='1').

 

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