Population CHart

Recommended Posts



I would like to create a population chart like this :


For the moment im using a StackedBar2D ,  2 bar series one with negative value stacked. 

But the probleme is that my label on chart and label on Axis are with negative value. Is it possible to format the label with an Absolute function ? 



Share this post

Link to post
Share on other sites



Please try using displayValue attribute to display the values and please use trend lines to display axis values.



<chart caption='Company Revenue' xAxisName='Month' yAxisName='Revenue' showYAxisValues='0' numDivLines='0'>

      <category label='Jan' />
      <category label='Feb' />
      <category label='Mar' />
      <category label='Apr' />
      <category label='May' />

   <dataset seriesName='Product A'>
      <set value='20800' />
      <set value='25800' />
      <set value='30400' />
      <set value='40400' />
      <set value='50400' />      

   <dataset seriesName='Product B'>
      <set value='-20800' displayValue='20.8k'/>
      <set value='-25800' displayValue='25.8k'/>
      <set value='-30400' displayValue='30.4k'/>
      <set value='-40400' displayValue='40.4k'/>
      <set value='-50400' displayValue='50.4k'/>

   <trendLines >
      <line startValue='0' displayValue='0' />

      <line startValue='20000' displayValue='20k' />
      <line startValue='40000' displayValue='40k' />
      <line startValue='60000' displayValue='60k' />

      <line startValue='-20000' displayValue='20k' />
      <line startValue='-40000' displayValue='40k' />
      <line startValue='-60000' displayValue='60k' />


Please find attached screen shot of the chart rendered using the above XML.


Hope this helps!


Share this post

Link to post
Share on other sites



i just created this chart 

but i don't get the bars at the same line

they appear one up and the other down



how can i make them in one line like the attached Thumbnails for bindhu please?




this is how my chart looks

Edited by QassiMona

Share this post

Link to post
Share on other sites


The attribute "placeValuesInside" is not supported by stacked bar chart type.

As it is a stacked chart type, ie one plot will come over another plot, so placing value out side won't be a good visualisation.


You can show value inside the plot, by setting the attribute "showValues" as 1 at the chart level.


In your case, you can use text annotation, as the plots are in opposite direction.


Using text annotations, you can add notes, labels, or any other contextual text information that you may want to make available inside the chart at any position.


For more detatils about annotation, please refer the Fusioncharts documentation links given below. 



Kindly refer the fiddle below for the implementation.


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