我開發了一個高圖表,但存在工具提示位置問題。 看來它不能正常刷新。當我使用鼠標時,它會卡住,或者顯示我放置鼠標的早期點的工具提示。我不確定我是否做錯了什麼。高圖表工具提示位置問題
Here is a fiddle for you to playaround.
http://jsfiddle.net/Mn6sB/
$(function() {
$('#container').highcharts({
chart: {
renderTo: 'chartContainer',
type: 'spline'
},
title: {
text: 'Pass rate statistics'
},
subtitle: {
text: 'Pass count per xxx'
},
xAxis: {
type: 'datetime',
minTickInterval: 24 * 3600 * 1000,
dateTimeLabelFormats: { // don't display the dummy year
month: '%e. %b',
year: '%b'
}
},
yAxis: {
title: {
text: 'PassCount'
},
min: 0
},
tooltip: {
formatter: function() {
return '<b>'+ this.series.name +'</b><br/> Pass Count: '+ this.y;
}
},
series: [{name: 'dev', data:[[Date.UTC(2013,9,25),12],[Date.UTC(2013,9,24),41],[Date.UTC(2013,9,23),1],[Date.UTC(2013,9,22),1],[Date.UTC(2013,9,20),1],[Date.UTC(2013,9,19),10],[Date.UTC(2013,9,18),22],[Date.UTC(2013,9,17),12],[Date.UTC(2013,9,16),16],[Date.UTC(2013,9,15),11],[Date.UTC(2013,9,14),4],[Date.UTC(2013,9,13),25],[Date.UTC(2013,9,12),11],[Date.UTC(2013,9,11),20],[Date.UTC(2013,9,10),16],[Date.UTC(2013,9,9),7],[Date.UTC(2013,9,7),1],[Date.UTC(2013,9,5),1],[Date.UTC(2013,9,4),1],[Date.UTC(2013,9,3),22],[Date.UTC(2013,9,2),13],[Date.UTC(2013,8,31),7],[Date.UTC(2013,8,30),12],[Date.UTC(2013,8,29),12],[Date.UTC(2013,8,28),5],[Date.UTC(2013,8,27),23],[Date.UTC(2013,8,26),2],]},{name: 'test', data:[[Date.UTC(2013,9,25),24],[Date.UTC(2013,9,24),4],[Date.UTC(2013,9,21),16],[Date.UTC(2013,9,20),41],[Date.UTC(2013,9,19),42],[Date.UTC(2013,9,18),42],[Date.UTC(2013,9,17),4],[Date.UTC(2013,9,16),3],[Date.UTC(2013,9,15),3],[Date.UTC(2013,9,14),3],[Date.UTC(2013,9,13),3],[Date.UTC(2013,9,12),1],[Date.UTC(2013,9,11),3],[Date.UTC(2013,9,9),3],[Date.UTC(2013,9,8),1],[Date.UTC(2013,9,7),1],[Date.UTC(2013,9,6),10],[Date.UTC(2013,9,1),3],[Date.UTC(2013,8,30),1],[Date.UTC(2013,8,29),1],[Date.UTC(2013,8,28),10],]},{name: 'intermediate', data:[[Date.UTC(2013,9,25),1],[Date.UTC(2013,9,24),1],[Date.UTC(2013,9,23),1],[Date.UTC(2013,9,22),1],[Date.UTC(2013,9,21),2],[Date.UTC(2013,9,20),1],[Date.UTC(2013,9,19),1],[Date.UTC(2013,9,18),1],[Date.UTC(2013,9,17),1],[Date.UTC(2013,9,16),1],[Date.UTC(2013,9,15),1],[Date.UTC(2013,9,13),1],[Date.UTC(2013,9,12),1],[Date.UTC(2013,9,11),1],[Date.UTC(2013,9,10),1],[Date.UTC(2013,9,9),1],[Date.UTC(2013,9,8),1],[Date.UTC(2013,9,7),1],[Date.UTC(2013,9,4),1],[Date.UTC(2013,9,3),1],[Date.UTC(2013,9,2),1],[Date.UTC(2013,9,1),1],[Date.UTC(2013,8,30),1],[Date.UTC(2013,8,29),2],[Date.UTC(2013,8,28),2],[Date.UTC(2013,8,27),2],]},{name: 'main', data:[[Date.UTC(2013,9,25),1],[Date.UTC(2013,9,24),1],[Date.UTC(2013,9,23),1],[Date.UTC(2013,9,22),1],[Date.UTC(2013,9,21),1],[Date.UTC(2013,9,20),1],[Date.UTC(2013,9,19),1],[Date.UTC(2013,9,18),1],[Date.UTC(2013,9,17),1],[Date.UTC(2013,9,16),1],[Date.UTC(2013,9,14),1],[Date.UTC(2013,9,13),1],[Date.UTC(2013,9,12),1],[Date.UTC(2013,9,11),1],[Date.UTC(2013,9,10),1],[Date.UTC(2013,9,9),1],[Date.UTC(2013,9,8),1],[Date.UTC(2013,9,7),1],[Date.UTC(2013,9,6),1],[Date.UTC(2013,9,5),1],[Date.UTC(2013,9,4),1],[Date.UTC(2013,9,3),1],[Date.UTC(2013,9,2),1],[Date.UTC(2013,9,1),1],[Date.UTC(2013,8,31),1],[Date.UTC(2013,8,30),1],[Date.UTC(2013,8,29),1],[Date.UTC(2013,8,28),2],[Date.UTC(2013,8,27),2],]},{name: 'test_th', data:[[Date.UTC(2013,9,24),4],[Date.UTC(2013,9,1),3],]},{name: 'intermediate_dev', data:[[Date.UTC(2013,9,21),1],[Date.UTC(2013,9,13),1],]},{name: 'rel', data:[[Date.UTC(2013,9,15),1],]},{name: 'staging', data:[[Date.UTC(2013,9,6),1],[Date.UTC(2013,8,30),1],]},{name: 'fun', data:[[Date.UTC(2013,9,5),1],[Date.UTC(2013,8,28),2],]},]
});
});
通過x的數據順序不正確。 –