I am using logarithmic axes on HighCharts and sometimes the chart will not render due to issues such as negative or 0 values which is totally understandable but it also fails if the axis label happens to be 0 or less as well. My question is: is there a way to capture or detect this issue during rendering so that I can dynamically change to linear axes as a fallback and render a message to notify the user why it failed?
Here is an example of a failed curve rendering due to a 0 label on the x-axis:
http://jsfiddle.net/axl163/Eqc5G/1/
Here are some more details on the HighCharts error:
http://www.highcharts.com/errors/10
I would appreciate any suggestions.
Thanks!
in your series add pointStart:1 and it should work. example:
series: [{
data: [0.001,1,1.2,1.4, 2,30],
pointStart: 1
}]
I addressed this issue by checking the values that go into HighCharts and if there are unacceptable values, the axes will automatically be changed to linear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With