Brian Fisher

stack100percent chart negative values

Recommended Posts

Hi

I'm creating a chart of type: msstackedcolumn2d. I set stack100percent to '1'. However, my chart has negative values. It is changing these to positive values when doing a stack100percent chart so as to total to 100%. I want to retain the negative values and so it wouldn't add up to 100% any more, the negative numbers would be below the x-axis and the total stack would sum to less than 100%. Is this possible to do with a setting?

Kind regards

Brian

Share this post


Link to post
Share on other sites

Hi Brian,

If you are using "stack100Percent" attribute, the chart will calculate and show the percentage distribution for individual items of a dataset considering only the absolute values and not negative or positive values.

Reference: https://www.fusioncharts.com/dev/chart-guide/standard-charts/stacked-charts#create-100-stacked-charts

 

However, if you still want to show the negative values below X axis you need to turn off "stack100Percent" attribute and enable "showPercentInTooltip" to see the percentage value calculated considering the negative value.

Demo: http://jsfiddle.net/srishti_fc/kqvsg3n9/3/

Thanks,

Srishti

Share this post


Link to post
Share on other sites

Hi Srishti

 

Thank you for getting back to me so quickly on this. It is very much appreciated.

My customer wants a stacked 100% chart with negative values showing as negatives so I'm going to have to do the percentage calculations myself and then display it. i was hoping for a shortcut but that's life :-)

Kind regards

Brian

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