SofTools.net

Y Axis Auto Scaling

Recommended Posts

See the attachments

 

When this graph is shown , the values on teh yaxis are between 0 and 2.5, but the auto scale goes up to 5, meaning half of the graph is blank.

 

I know if I use the yAxisMaxValue='3' parameter, this would fix the issue, but the data is dynamic from the database, so this is not an option.

 

Why would the scale go to 5?

 

The msLine.swf is dated Nov 2010 and we a re a licensed user.

 

Do you have any recommendations?

 

Thanks in advance

post-9449-0-52451900-1316077545_thumb.jpg

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your post.

 

Could you please send us the generated XML code to look into the issue?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your response.

 

Please try the same by setting <adjustDiv='0'> attribute inside the <chart> element.

FusionCharts automatically tries to adjust divisional lines and limit values based on the data provided. However, if you want to set your explicit lower and upper limit values and number of divisional lines, first set this attribute to false. That would disable automatic adjustment of divisional lines.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi

 

Thanks for the reply.

 

I DO NOT want to explicitly set the min and max values of the axis (by using adjustdiv, or yaxismaxvalue)

 

Because the data that comes out of the Database is not a fixed set of values, I need FusionCharts to automatically scale, which is what the above graph does. My issue is that this auto scaling goes from 0 to 5, which is surely wrong if the data only goes from 0 to 2.5 - Half of the graph is blank, which loses some of the visibility of the data - if it was more spread out, we would be able to differentiate more between the lines

 

Hope this makes sense!

 

Thanks

 

Mark

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your response.

 

Please try once by setting <numDivlines='2'> attribute inside the <chart> element of your XML code.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi

 

THanks for the reply, but I can't do this on the chart because the data is generated from a database, so the values might be 0 to 2.5 (as is the case here), or they might be 0 to 500.

 

Having just 2 div lines is not appropriate

 

The question I am asking is why the scale goes from 0 to 5 when the data only goes from 0 to 2.5

 

Is this a bug in the maths behind the auto scaling? - if so when will it be fixed?

 

Thanks

 

Mark

Share this post


Link to post
Share on other sites

Same problem here,

The max value in my graph is 2.35 and minimum value is zero, but the Y-Axis scale display 0,1,2,3,4,5.

When I set adjustDiv="0", the Y Axis values change to 0, 0.6, 1.2, 1.8, 2.4, 3.

 

I would like to get 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, how can I get it?

 

 

My values are also calculated from database, it may be change over 5.

Share this post


Link to post
Share on other sites
Guest Sumedh

Greetings. :)

 

For adjusting values on y-axis, you would need to set following attributes under the chart element,

 

<chart ... adjustDiv='0' yAxisMaxValue=' ' yAxisMinValue=' ' numDivLines=''>

 

Also please note, you would need to calculate and set numDivLines attribute according to the data you are providing to the chart.

 

For more information, please refer the following URL:

http://docs.fusioncharts.com/charts/contents/?AttDesc/DivLines.html

 

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