Meuh

Population CHart

Recommended Posts

Hello,

 

I would like to create a population chart like this :

 

Bar_graph_on_African_population_500px.pn

 

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

Hi,

 

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

 

Example:

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

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

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

   <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'/>
   </dataset>

   <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' />
   
   </trendLines>   

</chart> 

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

 

Hope this helps!

post-62559-0-08303000-1395377970_thumb.png

Share this post


Link to post
Share on other sites

Hello 

 

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

http://imgur.com/a/lRRCq

Edited by QassiMona

Share this post


Link to post
Share on other sites
Hello,

 

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