Set axis type to logarithmic
Description
The following code shows how to set axis type to logarithmic.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function () {<!--from w w w . j a va 2 s . c o m-->
$('#container').highcharts({
chart: {
width: 400,
height: 400,
spacingRight: 20
},
xAxis: {
type: 'logarithmic',
min: 1,
max: 1000,
endOnTick: true,
tickInterval: 1,
minorTickInterval: 0.1,
gridLineWidth: 1
},
yAxis: {
type: 'logarithmic',
min: 1,
max: 1000,
tickInterval: 1,
minorTickInterval: 0.1,
title: {
text: null
}
},
legend: {
enabled: false
},
series: [{
data: [
[550, 870], [800, 362], [700, 711], [547, 600], [595, 197], [332, 144],
[600, 335], [928, 826], [400, 500], [600, 411]
],
type: 'scatter'
}]
});
});
</script>
</head>
<body>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
</body>
</html>