Guest Rajroop

SY axis scaling

Recommended Posts

Hi, I use several chart with 2 y-axes. It is very difficult to get the scaling to work nicely. In fact, it is almost impossible to get whole number y-axis labels on both sides. Would it be possible to have the 2nd y axes labels not necessarily positioned at the grid lines, but instead placed so that the 2nd y labels cleanly divide the axis and there are no jagged numbers?

 

 

 

Thanks,

 

Brian

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello Brian,

 

 

 

Hope you are doing well. :)

 

 

 

Could you please provide us with the XML of the chart you are facing this issue with? In this case, also please specify, along with a snap shot of the problem, what you would need to change with reference to the Y-axis values?

 

 

 

I apologize for any inconvenience caused.

 

 

 

Looking forward to your reply to this.

Share this post


Link to post
Share on other sites

Here is my XML

 

 

 

As you can see, the left y axis is fine. However, the right y axis uses the has the following labels: 1,241 1,185.4, 1,129.8, 1,074.1 etc

 

These crooked numbers look terrible! How can I make it so that both the right and left y axes have nice even labels?

 

 

 

 

 

I also get the following warning in the debugger:

 

 

 

ERROR: Invalid number specified in XML. FusionCharts can accept number in pure numerical form only. If your number formatting (thousand and decimal separator) is different, please specify so in XML. Also, do not add any currency symbols or other signs to the numbers.

 

 

 

Do you know what's causing that?

 

 

 

 

 

Thanks,

 

Brian

Right Y axis XML.txt

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello Brian,

Apologies for the delay in reply.

Could you please try setting SYAxisMaxValue='1244'?

Looking forward to your reply.

Share this post


Link to post
Share on other sites

I understand that 1244 is a more convenient value to choose for the second Y axis maximum. However, the data from these charts are automatically generated on the from a database and there are millions of combinations. I have an algorithm to pick convenient max/min values for the primary y-axis but I don't have one that picks convenient ones for the 2nd y-axis to mesh well with the first. If I do not specify SyAxisMinValue and SyAxisMaxValue, the default SY max/min values generally not well chosen. Do you have an algorithm for choosing convenient values for SYacis max and min based on the data? It may be necessary to allow the SY axis labels to not tied to the gridlines. Many other graphing software allows for this and this problem is avoided.

 

 

 

Thanks,

 

Brian

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello Brian,

I'm afraid, we do not have an algorithm as per your requirements.

You can however, try to follow the steps below:

1. Let the chart calculate the SYAxisMinValue.

2. Get the maximum data point value of SYAxis.

3. Get the difference between the Max and min value

4. If the difference is divisible by the number of div lines then set the SYaxisMaxvalue='the maximum data point value in step 2'

  else, add the least possible number to this 'the maximum data point value in step 2' such that the difference is divisible completely by the number of div lines.

I'm afraid, the SYAxis values will be tied to the grid lines.

Thank you for your suggestions. We have made a note of the same.

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