本文介绍了Highcharts:以对数刻度显示零值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用对数坐标轴在y轴

I am working with logarithmic scale in the y-axis

我知道log(0)不存在,但我需要绘制0值,需要一个对数标度。

I know that log(0) doesn't exist but I need to draw 0 values, and I need a log scale.

我在其他答案中读到将零值更改为 null 可以解决问题,它不为我工作。请参阅示例:

I read in other answers that changing the zero values to null solve the problem, but it is not working for me. See the example: http://jsfiddle.net/QEK3x/15/

提前感谢。

推荐答案

虽然不完美,将零点设置为0.0001,然后将y轴最小值设置为0.0001:

Although not perfect, the best I came up with was to set the zero point to 0.0001 and then set the y-axis min to 0.0001:

yAxis: {
    min:0.0001,
    type: 'logarithmic'
},

series: [{
    data: [100,10,0.0001,0.1,0.01,0.1]
}]



此外,此答案可能是nelp:

这篇关于Highcharts:以对数刻度显示零值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 02:35
查看更多