Set axis link with linkedTo
Description
The following code shows how to set axis link with linkedTo.
Example
<!--from w ww . j a v a 2 s.c o m-->
<!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 () {
$('#container').highcharts({
chart: {
type: 'column'
},
xAxis: [{ // master axis
type: 'datetime',
tickInterval: 24 * 3600 * 1000
}, { // slave axis
type: 'datetime',
linkedTo: 0,
opposite: true,
tickInterval: 24 * 3600 * 1000,
labels: {
formatter: function () {
return Highcharts.dateFormat('%a', this.value);
}
}
}],
series: [{
data: [221, 7, 100, 29, 144, 16, 235, 18, 216],
pointStart: Date.UTC(2010, 0, 1),
pointInterval: 24 * 3600 * 1000 // one day
}]
});
});
</script>
</head>
<body>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
</body>
</html>