You must be logged in to post your query.
Home › Forums › Report Bugs › AxisY2 Maximum broken in 1.8
After upgrading from 1.7 to 1.8 my chart that using a secondary Y axis is no longer able to find the maximum value:
axisY2: { labelFormatter: function (e) { var maxElement = e.chart.axisY2.maximum; return FormatDataSize(maxElement, e.value); } },
The firstproblem is e.chart.axisY2 is no longer valid… so something has changed…
It should instead be e.chart.options.axisY2.maximum
Uhm… I will try that. I rolled back to 1.7 and its working with e.chart.axisY2.maximum.
This does not work. That option always returned “undefined”!
You can see from the console.log output of e.chart under the labelformatter:
Jacob, Its ‘e.chart.options.axisY2.maximum’. Kindly check the screenshot you have added, it has field called options.
Yes you are right BUT under axisY2 it is missing the “maximum” value.
So: e.chart.options.axisY2.maximum is ALWAYS “undefined”. This started with 1.8
Hi Jacob,
Thanks for bringing this to our notice. In earlier version of CanvasJS user had access to internal methods and variables which has been kept private from version 1.8. But in the future versions, we are planning to give user structured internally calculated values such as minimum and maximum. As of now, if you know the maximum value suiting to your requirement, you can set it for axisY2 and after that e.chart.options.axisY2.maximum will be available.
Yeah I don’t know the maximum though…. its completely different based on the system the product is running on and the maximum is different each day. I’m using it to display the data in MB, GB, or TB which is why I need to know what the maximum is.
For now I just hard coded it to use GB format but thats not really ideal.
When could we expect this back in the future versions?
Sorry, Jacob
We are considering this feature for future versions but we don’t have exact timeline yet.
Ah that sucks. Not cool paid $400 then a feature I used was ripped out :-(
Sorry for the inconvenience. We try our best to maintain backward compatibility while releasing new versions. But in this case the API you used was an undocumented API and hence it has changed.
Just for this version we can give you a separate build by making the previous feature available. Please write an email to info@canvasjs.com and we’ll send you a new build.
Going forward please try to use only the documented APIs. Undocumented APIs would be at your own risk… :-)
— Sunil Urs
You must be logged in to reply to this topic. Login/Register