0

When trying to set my yAxis to logarithmic type on a Waterfall chart, Highcharts throws the following error.

Error 10 : Can't plot zero or subzero values on a logarithmic axis

I've tried setting pointStart: 1 in my series, also tried to set yAxis.min=1, but I still have the issue. I have negative values in the data, but it should not matter on a mathematical point of view (Btw, it also does not work with only positive values).

Minimal code to reproduce the error: http://jsfiddle.net/1d2zsvLf/3/

Direct code:

$(function() {
  $('#container').highcharts({
    chart: {
      type: 'waterfall'
    },
    yAxis: {
      type: 'logarithmic',
      // min: 1
    },
    series: [{
      data: [2000, 23, 36, 12, -4, -6, -32, 1500],
      // pointStart: 1
    }]
  });
});
Kabulan0lak
  • 2,116
  • 1
  • 19
  • 34
  • Just as the error says: "Can't plot zero or subzero values on a logarithmic axis". You have negative values in your data. – wergeld Aug 31 '16 at 15:22
  • Thanks but I mentioned it: *it also does not work with only positive values* See here http://jsfiddle.net/1d2zsvLf/4/ – Kabulan0lak Aug 31 '16 at 15:23
  • 1
    I would assume that it is because a waterfall chart assumes a zero baseline, and therefore may be forcing a zero baseline. Which would make sense. Under normal circumstances, a log axis on a waterfall chart does not make any sense. – jlbriggs Aug 31 '16 at 19:56
  • 1
    It is because of threshold parameter, when you will set it to value bigger than 0, it will be possible to draw the chart. The problem will occur with recalculating the column positions. I have posted it on Highcharts github: https://github.com/highcharts/highcharts/issues/5646 – Grzegorz Blachliński Sep 01 '16 at 09:47
  • Thank you very much for posting on Github @GrzegorzBlachliński. I realize also that it would not make any sense to have a logarithmic axis on a waterfall, you're right jlbriggs. – Kabulan0lak Sep 01 '16 at 13:42

0 Answers0