Alternative maths – plotting negative values on a logarithmic axis.

Strictly speaking, a logarithmic scale can't plot negative values, for the simple reason that it is not mathematically correct.

Math.log(1) => 0;
Math.log(0.1) => -2.3025850929940455;
Math.log(0) => -Infinity;
Math.log(-1) => NaN;

But in the real world, there are cases where we want to combine the pros of a log axis with zero or negative values, so in the next Highcharts version we have provided hooks for adding custom conversion functions.

 Torstein Hønsi  @TorsteinHonsi

Do you have some code you want to share with the world as well? Go here to learn how you may contribute some helpful code of your own.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.