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

I think you are saving that you broke it in 3.13 and here is the workaround. You know this works in all versions prior to 3.13 don't you?

All in all I can work with this, it is disappointing though that the "automatic internal divisional line algorithm" has broken but I can turn it off and replicate the work that your algorithm is doing myself.

Displaying the 0 on the y-baseline shouldn't really be a function of the "automatic internal divisional line algorithm" which really is the point isn't it.

Share this post


Link to post
Share on other sites

Hi,

 

In any of the versions, when you are setting the "yAxisMinValue" or "yAxisMaxValue" explicitly all you need to do is to first set the adjustDiv attribute to 0 to disable the automatic adjustment of divisional lines, as stated in the documentation shared in the earlier response.

image.thumb.png.0c212965493c3b5b83eeb5743de85336.png

Please note : Without setting the "adjustDiv" to "0", if you set any of the above attributes to customize the axis limits or div intervals, it may not work properly. Which is the case for your instance.

As you have not set the attribute "adjustDiv" to "0" in your chart dataSource(provided in your sample - https://jsfiddle.net/f87az9ec/), but you have manually set the limits the result is unexpected. The "adjustDiv" attribute is provided for this purpose when a user wants to set the limits explicitly, it has to be disabled first.

Working sample with adjustDiv set to "0" : https://jsfiddle.net/f87az9ec/3/

Hope this helps.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites
Quote

In any of the versions, when you are setting the "yAxisMinValue" or "yAxisMaxValue" explicitly all you need to do is to first set the adjustDiv attribute to 0 to disable the automatic adjustment of divisional lines, as stated in the documentation shared in the earlier response.

You see this is where we have a differing view. You see with 3.12.x and every version before that it works just fine. See this jsFiddle (https://jsfiddle.net/f87az9ec/4/).

Also this isn't a bug in the automatic adjustment of the divisional lines, it's a bug in the labeling of the minimum y-axis value which is somehow linked to the setting of adjustDiv in v3.13.x

Either way, it's a bug. "may not work properly" is the exact wording for something (ie: a bug) that used to work (3.12.x and older), doesn't work anymore (3.13.x and newer).

Nevertheless, we have moved on, turned off adjustDiv to work around the bug and have written our own automatic divisional line algorithm as the FusionCharts version now has unwanted side-effects in v3.13 and newer.

Personally I really don't see how this is so hard to fix, especially as it used to work.

Anyone else who suffers the same issue when upgrading to 3.13, let me know and I'll send you the code for our algorithm so you can work around the bug. Maybe I'll post it on StackOverflow so others can work around the bug.

Edited by IssioDev

Share this post


Link to post
Share on other sites

Hi,

 

We have check internally regarding the reported scenario.

The y-axis lower limit that is not displayed when you are setting "yAxisMaxValue" is an issue in the current version that is 3.13.2-sr.1. For that we have already logged it internally and the respective team will work on it. We would keep you posted with the updates via this chain.

Regarding the div line intervals, when you are setting "yAxisMaxValue" to "11" and with the default value of "adjustDiv"(which is "1" or enabled). The intervals would be 0, 2, 4, 6, 8, 10, 11 which is as per the new optimized interval calculation algorithm(from 3.13.0) it will adjust the divisional lines to display a good looking intervals, instead of dividing the range equally with interval values in fractions/decimals or with an interval of 1 (as it used to be in the earlier versions).

Sample : https://jsfiddle.net/mnb7vzc3/ (Please note : "0" not displayed as lower limit is an issue which will be fixed).

Please note : If you want it as the older versions, set "adjustDiv" to "0" to display the div values by dividing the range equally - https://jsfiddle.net/mnb7vzc3/1/

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Hi,

 

Hope this mail finds you well. 

Thank you for your continued patience.

For the issue reported, could you please upgrade your current version to the latest, i.e, FusionCharts Suite XT v3.13.4?

To avail the licensed release, you would need to re-download the entire package from the My Orders section of FusionCharts Product Update Center. PUC URL: https://puc.fusioncharts.com/

To download the Evaluation version of FusionCharts Suite XT v3.13.4, please visit the link: https://www.fusioncharts.com/download/fusioncharts-suite-xt

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites
Quote

For the issue reported, could you please upgrade your current version to the latest, i.e, FusionCharts Suite XT v3.13.4?

I can confirm that this is now fixed with v3.13.4.

Note: When I went to download from the Product Update Center it listed the latest version as v3.13.3-sr.1, but the downloaded files were actually v3.13.4

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