IssioDev

Doesn't display 0 y-axis label on mscombi2d with odd max value

Recommended Posts

When using an mscombi2d chart with y-axis values:

        'AxisMinValue: 0,
        yAxisMaxValue: someOddValue

The zero value for the y-axis is not displayed. If the yAxisMaxValue is even then it is displayed. In fact this happens whenever the scale is not a multiple of the gap, ie: min: 0, max 13.

This is new to 3.13.x

Screen Shot 2018-10-24 at 6.06.50 PM.png

Screen Shot 2018-10-24 at 6.06.58 PM.png

Screen Shot 2018-10-24 at 6.08.19 PM.png

Share this post


Link to post
Share on other sites

Hi,

 

The horizontal divisional lines are placed on equal intervals against the y-axis scale. For example : 0, 2, 4, 6, 8, 10,.... or 0, 5, 10, 15,....

You can set the y-axis limits using the attributes "yAxisMaxValue" and "yAxisMinValue", along with the number of div lines you want in between those limits using "numDivLines". These number of divisional lines would be dividing the y-axis in equal intervals. Please refer to the below documentation link for :

Chart limit configuration : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/chart-limits

Div line configuration : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/div-lines-and-grids

Also find a sample fiddle for reference :

http://jsfiddle.net/xb9TG/2642/

Please note : If you do not set the attributes mentioned above, the internal algorithm sets a good-looking y-axis range and intervals based on the data values provided.

Default : http://jsfiddle.net/xb9TG/2639/

 

However, if you still face the problem, kindly provide a sample fiddle with your dataSource, and also let us know which version of FusionCharts are you using, so that we can check the same at our end and assist you accordingly.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Hi,

 

Check this modified sample setting an attribute "adjustDiv" to "0" to disable the automatic internal divisional line algorithm :

https://jsfiddle.net/f87az9ec/3/

 

Please note :This would work in all the versions as you are setting the limits manually, you need to disable the internal div calculation.

For further reference, please check the documentation link already provided in the earlier post that explains the above in details :

https://www.fusioncharts.com/dev/chart-guide/chart-configurations/div-lines-and-grids

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Still not fixed in 3.13.3, I was so hopeful. Oh well, setting the yAxisMaxValue seems to be the thing that invokes the bug with adjustDiv: 1, if you let the chart work out the yAxisMaxValue from the data it seems fine.

Share this post


Link to post
Share on other sites

Hi,

 

We already have an issue logged for your reported scenario of y-axis lower limit(0) not appearing when y-axis max value is manually set with adjustDiv=1(default). It has been scoped to 3.14 version release.
We will keep you posted with the updates.

However, when the yAxisMaxValue is set manually with adjustDv set to 1, will adjust the divisional lines with good looking intervals but also keeping the maximum value as it is set(odd or even). Sample : http://jsfiddle.net/S52bN/2556/
If you want to have the divisional lines to be equally spaced(which may not have a good looking intervals) then you need to set adjustDiv to 0. Sample : http://jsfiddle.net/ek1rw6o9/

 

Thanks,

Akash.

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