nitmas

Dual Y Axis with Same Baseline but Different Scale

Recommended Posts

Hello,

I'm trying to use a stackedcolumn3dlinedy chart to display daily sales dollars by category along with overall daily transactions.  I would like the primary and secondary y axis to scale independently but have their baseline at 0 align.  This seems to work fine until there are negative sales dollars represented in a category.  Once this occurs, the primary y axis adjusts to show negative values, and the secondary y axis has it's zero point move downward to correspond with the negative primary y axis value.  I've attached a picture of the issue.  Notice how the line chart behaves...

Is there any way to keep the zero value of the secondary y axis aligned with the zero value of the primary y axis?  All while maintaining their respective scales.

chart.JPG

Share this post


Link to post
Share on other sites

Hello,

Thanks for your response, but that would only work if the primary and secondary axis value are similar.  When the primary axis is dealing with numbers in the 100k's and the secondary axis is dealing with numbers in the 0-500 range the line part of the chart is rendered useless.  See the screenshot from your sample.  The line might as well not even be there.

The baseline needs synched, but the primary and secondary axis need to remain independent.

Thanks

 

chart2.JPG

Share this post


Link to post
Share on other sites

Hello,

Thanks for the response.

To sync the zero plane of both the axis without any manipulation, please use syncAxisLimits attribute, where limits of both the axis will get sync as well.

To make both the axis independent on each other while their zero plane is same, please set the  sYAxisMinValue attribute with a -ve value (by trail and error method) so that zero plane of both the axis will get sync.

Kindly refer the sample given below for the implementation.

http://jsfiddle.net/Prerana/Au3LY/128/

 

Share this post


Link to post
Share on other sites

Hello,

Thanks for the second option, but this will not work either.  The data is entirely dynamic based upon the time range that the user selects.  The primary axis may or may not go into the negative.  I just need the 0 line to match up wherever it may fall, and the primary and secondary axis to scale independently of each other (which is the entire point of having two axis').

Thanks

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