Sign in to follow this  
mikeygriff

Formatting Negative Values As Positive Values

Recommended Posts

Is it possible to format a negative value to display as a positive value, even thought the chart is driven by the negative value! Hope that makes sense!?

It would enable me to create an Age Distribution type chart where values for males and females are displayed in a stacked bat around a central axis, with male values extending to the left, female to the right (see attachment). Or could this be achieved using a different chart type?

post-17573-019408500 1307455310_thumb.jpg

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum!smile.gif

 

First of all, we would like to thank you for showing interest in FusionCharts.

 

Please find below the modified XML code for our reference:

 

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

  <categories>
     <category label='Group 1' />
     <category label='Group 2' />
     <category label='Group 3' />
     <category label='Group 4' />
     <category label='Group 5' />
     <category label='Group 6' />
     </categories>

  <dataset seriesName='stuff.Negative'>
     <set value='-15' />
     <set value='-9'/>
     <set value='-3' />

  </dataset>

  <dataset seriesName='stuff.Positive'>
     <set value='3' />
     <set value='9' />
     <set value='15' />
  </dataset>

  <trendlines>
     <line startValue='-18'  displayValue='18'/>
    <line startValue='-9'  displayValue='9'/>
    <line startValue='-3'  displayValue='3'/>
     <line startValue='0'  displayValue='0'/>
    <line startValue='3'  displayValue='-3'/>
   <line startValue='9'  displayValue='-9'/>
   <line startValue='15'  displayValue='-15'/>
   <line startValue='18'  displayValue='-18'/>
   <line startValue='27'  displayValue='-27'/>
  </trendlines>

</chart> 

 

 

Hope this helps.smile.gif

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