Add logarithmic axes
For showing really low and really high values on the same axis
Logarithmic axes were completed as of Highcharts 2.2.
-
@Sherzod: If you open the JavaScript console of your browser, you'll see the error message explaining why it doesn't work. The point is that a minimum of 0 doesn't make sense in a logarithmic axis: http://jsfiddle.net/highcharts/TM9rR/2/.
-
Sherzod Ruzmetov commented
Hi,
logarithmic is not working for me though. Please see: http://jsfiddle.net/sherzodr/TM9rR/
If you change "linear" to "logarithmic" it results in an empty canvas :(. Can you please see what I may be doing wrong?
Thank you
-
-
pg commented
Is there a way to scale bars in a column chart? Basically, I have a column chart which trying to draw based on a data series that has numbers fluctuating by quite a lot, the data values look something like:
[3000000, 7000000, 25000, 9000000]
The bar for 25000 doesn't display because the value is so much smaller than other.
-
Supported: http://jsfiddle.net/highcharts/55TfZ/1/
-
Ghislain LEVEQUE commented
What about logarithmic on xAxis ?
-
-
Shance Ordell commented
That is awesome news! I just downloaded the latest - 2.1.9. Can you tell me when 2.2 will be released? P.S., great product, makes me look like a super star at work.
-
Yes of course it will be fixed for columns when we release the non-experimental logarithmic axes in Highcharts 2.2. Here's a preview of what you can expect: http://jsfiddle.net/highcharts/ZUcCS/518/. Setting the threshold to null will be handled automatically in the final release, and also the animation will be fixed to start at the bottom.
-
Shance Ordell commented
It does not work for both column and bar charts. In an earlier comment it was mentioned that these didn't work because they both assumed a yAxis of zero. Although the comment does not make sense to me it does imply that this was not working in the experimental version. But I assumed that with the official release (albeit still experimental) in 2.1.6 that this would have been fixed. Just want to confirm that this is in fact still not working, whether or not there are any plans to get this working and if so when a fix can be expected. Thanks.
-
mangobug commented
Is logarithmic scaling in working order for Horizontal Bar Charts?
-
Shance Ordell commented
I have 2.1.9 which says that logarithmic is experimental. It works for series.type=line but not series.type=column. Is this because of the experimental phase?
I also say the suggestion that I could use the pow(10, this.value) in the axis formatter. Could I get more details on this? Under which option?
Thanks in advance.
-
Dominik Macher commented
Cooool! :)
-
Rafal Hladyszowski commented
Hello, does it work for Highstock?
-
You can use the xAxis.labels.formatter option.
-
wei-zhang commented
when I write some real small data ,like 0.00001,0.0000000034,around the Y line ,it will write from 0.001,0.0001... 1e-7,1e-8......
now ,i want it write from 1e-3,1e-4,1e-5....
how can i get it like this ? -
It's because logarithmic axes are only experimental yet. I just added support for log values on plot bands and plot lines, please see http://jsfiddle.net/highcharts/ZUcCS/275/.
-
wei-zhang commented
I would like make a plotBnad on th Y dataline ,but it not work when the yAxis type is 'logarithmic',why? please tell me what can i do to make it worked. thank you very much
code like this:
yAxis: {
title: {
text: 'Temperature (°C)'//
},
type: 'logarithmic',//here i used a logarithmic
min:0.000000001,//the Y max
max:0.0001,//the Y min
plotBands:[{ //here ,I would like make a plotBnad ,but it not work when the type is 'logarithmic',why? please tell me thank you very much
color:'#FCFFC5',
from:0.00001,
to:0.000001,
}],
}, -
wei-zhang commented
I would like make a plotBnad on th Y dataline ,but it not work when the yAxis type is 'logarithmic',why? please tell me what can i do to make it worked. thank you very much
code like this:
yAxis: {
title: {
text: 'Temperature (°C)'//
},
type: 'logarithmic',//here i used a logarithmic
min:0.000000001,//the Y max
max:0.0001,//the Y min
plotBands:[{ //here ,I would like make a plotBnad ,but it not work when the type is 'logarithmic',why? please tell me thank you very much
color:'#FCFFC5',
from:0.00001,
to:0.000001,
}],
}, -
I'm sorry we haven't got around to finishing this. You should be able to make it work though, by using our example, and use pow(10, this.value) in the axis formatter.