Source IP
Dest IP
Start time
End time
查询
# 定义两个highchart对象.
Highchart的话请参考此链接http://blog.csdn.net/splendid_java/article/details/9186681
在图中对应的是上方的图
function showMscChart(hour,max,min,avg){
$('#container1').highcharts({
chart: {
type: 'line',
},
title: {
text: 'Network Responce'
},
xAxis: {
type:'datetime',
categories: hour #这边标示x坐标轴,我们通过参数hour来自定义
},
yAxis: {
title: {
text: 'Network responce:ms'
}
},
plotOptions: {
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: false
}
},
#series是具体需要显示的数据。我们同样通过传参来进行赋值。
series: [{
name: 'max',
data: max
}, {
name: 'min',
data: min
}, {
name: 'avg',
data: avg
}]
});
}
#在显示的图中对应的是下方的图
function showLossChart(hour,loss){
$('#container2').highcharts({
chart: {
type: 'line',
},
title: {
text: 'Network responce'
},
xAxis: {
type:'datetime',
categories: hour
},
yAxis: {
title: {
text: 'Network loss:%'
}
},
plotOptions: {
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: false
}
},
series: [{
name: 'loss',
data: loss
},]
});
}