In my HighChart graphic lines, the series data comes from my Ruby on Rails application dynamically. Sometimes series values are zeros or less, which is a problem for HighCharts, and this raises the following exception:
Highcharts Error
So, as a workaround, I process my ruby array to conditionally replace a zero of a smaller value with a negligible positive number, for example. 0.00001 as below:
oil_vol_array = d_array[1].map { |e| (e < 0.0001) ? 0.0001 : e.round(3) }
This prevents the exception from being thrown, but the display shows a graph starting with 0.0001 if the initial value is zero (of course, since I requested it). A more desirable display would be to start the chart from scratch, but he does not like HighChart :(
Is there a way this can be achieved?
source share