当日期时间xAxis的startOnTick和/或endOnTick设置为true时,向左和向右拖动导航器会将其展开,直到它填满整个数据范围。
请参阅: http://jsfiddle.net/L3t4s/2/
下面的重复代码:
<div id="container" style="height: 400px; min-width: 600px"></div>
<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
<script type="text/javascript" src="http://www.highcharts.com/samples/data/usdeur.js"></script>
$(function() {
$('#container').highcharts('StockChart', {
chart: {
plotBorderWidth: 1
},
rangeSelector: {
selected: 4
},
xAxis: {
startOnTick: true,
endOnTick: true
},
series: [{
name: 'USD to EUR',
data: usdeur
}]
});
});