Sign in to follow this  
S.Sekar

Dynamic Scale with sensible Max value

Recommended Posts

Hi

 

 

 

I am using dynamic Y Axis scaling. However, it calculates it so dynamically that at times numbers are not user friendly. The requirement is to set the Y Axis Max to nearest 2.5,5,10,25,50,100,250,500,1000,2500 ....

 

 

 

This will enable sensible yAxis division values. For example, if max reading is around 60%, it shows 12,24,36,48 & 60. Instead, we would like to have it as 20,40,60,80 and 100%.

 

 

 

How can we control it with in Fusion Chart.

 

 

 

Note : You may suggest to do it st server side and set the max value forcibly. But our requirement is to set it at client side as server side calculation will get bit more complicated as we areusing Mutiaxis chart with each axis showing multiple measurements and calculating at server side it bit complex.

 

 

 

Regards

 

Sekar

Share this post


Link to post
Share on other sites

Hi

Please use the <chart> attributes - numDivLines, yAxisMaxValue, yAxisMinValue? These attributes control the y-axis.

i.e

<Chart numDivLines='9' yAxisMaxValue='100' yAxisMinValue='0'  >

  <set value="20" label="class 1"/>

  <set value="40" label="class 2"/>

  <set value="90" label="class 3" />

</Chart>

Edited by Guest

Share this post


Link to post
Share on other sites

Hi

 

 

 

The issue is with MutiAxis... I know that I can still add yAxisMaxValue for each Axis. But calculating it at server level is bit complex. Is there any option to make it adoptive at client level. As you are already calculating Max value, once calculated max value, need to have option to further map it up.

 

 

 

Regards

 

S.Sekar

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Please note that FusionCharts framework will auto calculate the Y-Axis values based on the limiting values (max and min value) and the number of DIV lines applied on the chart.

 

However, the limiting values also auto calculated by the library itself, based on the set of data points provided to the chart for plotting. Else, you can explicitly set these values using "yAxisMinValue", "yAxisMaxValue", "numDivLines".

 

Dynamically if you are willing to set those values in PHP, you would just need to set in the XML string which you are generating based on the data fetched from your MySQL db.

 

For more information on "XML/JSON Attributes for Divisional Lines", please visit the link: 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
Sign in to follow this