Sign in to follow this  
Ranen

2D Column Chart:- percentage value on top of the bar

Recommended Posts

Hello,

 

Please refer to the attached image. I want 2d column charts with % value on top of the bar- tool tip must show the real value, I tried to do that but I did not get what I want. Little more explanation:-

 

I have y-axis with max value,say, 1600.  and column values,say, 899, 1120,1567. Now when I ask my chat to display column data as %, it shows like this 899%, 1120% or 1567% which I don't want, I want something like 899= 56.19% => how this comes => 899/1600 (NB = 1600 is the highest value of y-axis) and I also want tool tip with real value like for 899, it has to display 899 on move over the bar.

 

 

Hope I am able to explain properly.

 

Regards,

Ranendra

post-36132-0-71687500-1373293348_thumb.jpg

Share this post


Link to post
Share on other sites

1 more point, the y-axis max value comes automatically depending on the data, in the above example, I said, its 1600, it can be 1900 or 90000 also. Is there anyway I can have a hold on the y axis max value?

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi Ranen,

 

Apologies for the delayed response.

 

If you want to display custom value above the data-plot, then you would need to use 'displayValue' attribute for that <set> element.

 

Ref. Code:

<set label='Jan' value='899' displayValue='56.19%'/>

 

Also, if you want to display value for that particular data-plot, then you can use 'showValue' attribute.

 

Ref. Code:

<set label='Jan' value='899' displayValue='56.19%' showValue='1'/>

 

Even, you can display custom text/label in the tool-tip using 'toolText' attribute.

 

Ref. Code:

<set label='Feb' value='1600' toolText='899'/>

 

For more information, please refer the following link:

http://docs.fusioncharts.com/charts/contents/ChartSS/Column2D.html

 

If you have set yAxisMaxValue as '1600' and if one of the<set> element has value greater than yAxisMaxValue then, chart automatically calculates this with respect to data which you are passing.

 

You can not make hold of yAxisMaxValue, if the one of the <set> element has higher value than that.

 

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