Sign in to follow this  
pieter

PYAxisMinValue not working with stacked multi chart

Recommended Posts

Hi all,

The XML parameter PYAxisMinValue seems to be ignored when using StCol2DLineDY.xml. PYAxisMaxValue, SYAxisMinValue and SYAxisMaxValue are working just fine.

Is this a bug?

With kind regards,

Peter

Edited by Guest

Share this post


Link to post
Share on other sites

Hi Arindam,

Here is a slightly ajusted version of a chart from the standard gallery supplied with the evaluation version. The problem seems to be that PYAxisMinValue is ignored.

I'm trying to get the axis for the primary and secondary data the same. This is because my column and line data use the same scale. I'm using MSStackedColumn2DLineDY.swf (it's the lastest version from your website).

HTML file:

<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FusionCharts v3 Documentation</title>
<link rel="stylesheet" href="../Contents/Style.css" type="text/css" />
<script language="JavaScript" src="../JSClass/FusionCharts.js"></script>
</head>
<body>
<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">
  <tr> 
   <td valign="top" class="text" align="center"> <div id="chartdiv" align="center"> 
    FusionCharts. </div>
  <script type="text/javascript">
 var chart = new FusionCharts("../Charts/MSStackedColumn2DLineDY.swf", "ChartId", "600", "350", "0", "0");
 chart.setDataURL("Data/StCol2DLineDY.xml");	 
 chart.render("chartdiv");
 </script> </td>
  </tr>
  <tr>
   <td valign="top" class="text" align="center"> </td>
  </tr>
  <tr> 
   <td valign="top" class="text" align="center"><a href="Data/StCol2DLineDY.xml" target="_blank"><img src="../Contents/Images/BtnViewXML.gif" alt="View XML for the above chart" width="75" height="25" border="0" /></a></td>
  </tr>
</table>
</body>
</html>

XML-file:

<chart caption='Annual Revenue' subcaption='In Million $'  xaxisname='Year' 
PYaxisname='Sales in M$' SYAxisName='Sales in M$' decimals='0' numberPrefix='$' 
numberSuffix='M' snumberPrefix='$' sNumberSuffix='M' setAdaptiveSYMin='1' 
showPlotBorder='1' palette='3' useRoundEdges='1' PYAxisMinValue='-10' 
PYAxisMaxValue='100' SYAxisMinValue='-10' SYAxisMaxValue='100' >
 <categories font='Arial' fontSize='12' fontColor='000000'>
 <category label='2001'/>
 <category label='2002'/>
 <category label='2003'/>
 <category label='2004'/>
 <category label='2005'/>
 </categories>
 <dataset>
 <dataSet seriesName='Product A' color='AFD8F8' showValues='0'>
  <set value='30' />
  <set value='26' />
  <set value='29' />
  <set value='31' />
  <set value='34' />
 </dataSet>
 <dataSet seriesName='Product B' color='F6BD0F'  showValues='0'>
  <set value='21' />
  <set value='28' />
  <set value='39' />
  <set value='41' />
  <set value='24' />
 </dataSet> 
 </dataset> 
 <dataSet>
 <dataset seriesname='Service A' color='8BBA00' showValues='0'>
  <set value='27' />
  <set value='25' />
  <set value='28' />
  <set value='26' />
  <set value='10' />
 </dataset>
 <dataset seriesname='Service B' color='A66EDD' showValues='0'>
  <set value='17' />
  <set value='15' />
  <set value='18' />
  <set value='16' />
  <set value='10' />
 </dataset>
 <dataset seriesname='Service C' color='F984A1' showValues='0'>
  <set value='12' />
  <set value='17' />
  <set value='16' />
  <set value='15' />
  <set value='12' />
 </dataset>  
 </dataSet>
 <lineSet seriesname='Cost as % of Revenue' showValues='0' lineThickness='4' >
 <set value='57' />
 <set value='68' />
 <set value='79' />
 <set value='73' />
 <set value='80' />
 </lineSet>
</chart>

Edited by Guest

Share this post


Link to post
Share on other sites

Hi Pallav,

thanks for the response.

I'm trying to plot a line on the same scale as the stacked columns. This is only possible if I get the min and max value the same.

Another solution for me would be to use the same formula on the secondary axis to determine the range of the scale as is used for the primary axis. Could you open/publish the formula that is used to calculate the minimum and maximum value for the stacked combi-chart in fusioncharts? In that way I could use the same scale on the secondary axis as fusioncharts chooses for the primary axis (i'm in the fortunate position that my data for the secondary axis is altway within the minimum/maximum value of the primary axis values so this solution would always work for me).

Could you publish the formula that calculates the minimum/maximum values of the axis?

Thanks,

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Can I confirm that for all versions the PYaxisMinValue cannot be set for the stacked column graph.

 

 

 

What we require is a stacked column graph where the Min and Max values of the primary Y axis are the same. At the same time the secondary Y axis, on a different scale, also needs to have the same Min and Max value. This means that both Primary and Secondary will share the same 0 line, and this will be in the middle of the graph.

 

 

 

The XML might look something like:

 

 

 

.... PYaxisMaxValue='1000000' PYaxisMinValue='-1000000' SYaxisMaxValue='60000' SYaxisMinValue='-60000'

 

 

 

 

 

It seems very strange to us that the Min values can't be set.

 

 

 

Thanks

 

 

 

Tim

Edited by Guest

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