snyderg

Automatic setting of Y max

Recommended Posts

I believe I am using the default / automatic settings, and my charts sometimes are showing an extra Y section at the top and bottom of the chart. Attaching the XML and a .jpg of the resulting chart.

post-5212-128441573122_thumb.jpg

MSColumn2D.txt

Edited by Guest

Share this post


Link to post
Share on other sites

Hello,

 

 

 

Could you please try setting the yAxisMaxValue='desired positive limit' and the yAxisMinValue=''desired negative limit' in the chart element?

 

 

 

Hope this helps.:)

Share this post


Link to post
Share on other sites
<graph gridbgcolor='FFFFFF' numberFormat='1' showCanvas='0' numDivLines='5' basefont='arial' 
yAxisMinValue='-12.21' showvalues='0' basefontsize='10' numberSuffix='%25' zeroPlaneAlpha='40' 
yAxisMaxValue='22.13' zeroPlaneColor='ADAAAA' outcnvbasefont='arial' outcnvbasefontsize='10' 
hovercapSepChar=':' > 
<categories>
<category name ='1 Month' font='Arial' fontSize='8' />
<category name ='3 Month' font='Arial' fontSize='8' />
<category name ='1 Year' font='Arial' fontSize='8' />
<category name ='2 Year' font='Arial' fontSize='8' />
<category name ='3 Year' font='Arial' fontSize='8' />
<category name ='5 Year' font='Arial' fontSize='8' />
<category name ='Inception' font='Arial' fontSize='8' />
</categories> 
<dataset seriesname='Northern+MN+-+WI+Area+Retail+Clerks+Pension+Fd+%28HI%29' color='002A6E' alpha='75' > 
<set value='6.53' />
<set value='21.13' />
<set value='-11.21' />
<set value='-6.02' />
<set value='-0.13' />
<set value='4.18' />
<set value='3.38' />
</dataset>
<dataset seriesname='Barclays+Aggregate' color='ADAAAA' alpha='75' > 
<set value='0.73' />
<set value='2.61' />
<set value='5.36' />
<set value='6.12' />
<set value='6.30' />
<set value='5.01' />
<set value='4.51' />
</dataset>
</graph>

Share this post


Link to post
Share on other sites

Hello,

 

 

 

I tested your XML in our labs. Could you please make the following changes to your XML and see if it suits you?

 

 

 

Keep the data intact (No need to round them up).

 

 

 

In the <graph> element:

 

 

 

1. Set yAxisMinValue='-12'

 

2. Set yAxisMaxValue='24'

 

3. Set numDivLines='5'

 

 

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

I solved this using two variables that checks for "higher/lower value then already defined" in the loop that creates the xml file. After the loop and before output, i added 1.25m to the values. The below code result i.e. -1143 and 42542.

if (row.value.Value < _getLowestValue) { _getLowestValue = row.value.Value; }

if (row.value.Value > _getHighestValue) { _getHighestValue = row.value.Value; }

_floorRoof =

"yAxisMaxValue='" + _getHighestValue.ToString("#") + "' yAxisMinValue='" + _getLowestValue.ToString("#") + "'";

this.lGraph.Text = string.Format(strXmlHeader, xmlGraphData, _floorRoof);

It might help someone..

 

//J

Share this post


Link to post
Share on other sites

I'm having a similar problem. I am using FusionCharts to produce bar graphs which have both positive and negative values. The adaptive y min and y max are terrible. The data for these charts is taken from a SQL database and the same file is used for plotting several different series. Therefore, setting a y max and y min manually is not an option.

 

 

 

I am using MSCombi2D.swf

 

Here is my XML:

Yaxis Problem XML.txt

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello Brian,

You can write your custom function which calculates the max and min values for a set of values in the database. After that you can add required padding to these values and set these as the yAxisMaxValue and yAxisMinValue in the chart XML.

 

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