流量统计traffic 跟动作增加导出csv,excel按钮

This commit is contained in:
zhanghongqing
2018-12-22 16:44:01 +08:00
parent 2c07e183eb
commit 953e00bc25
3 changed files with 24 additions and 12 deletions

View File

@@ -60,6 +60,7 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/themes/grid.js"></script> --%>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var starth=$("#beginDateh").val();
@@ -121,6 +122,16 @@ function showActionTransChart(rs){
scale:1,
sourceWidth: 1280,
sourceHeight: 500,
buttons: {
contextButton: {
menuItems: [
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[0],// 打印
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[1],// jpeg
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[4],// excel
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[3],// cvs
]
}
}
},
title: {
text: null

View File

@@ -83,6 +83,7 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var starth=$("#beginDateh").val();
@@ -366,6 +367,16 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
scale:1,
sourceWidth: 1280,
sourceHeight: 550,
buttons: {
contextButton: {
menuItems: [
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[0],// 打印
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[1],// jpeg
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[4],// excel
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[3],// cvs
]
}
}
},
yAxis: {
title: {
@@ -377,18 +388,8 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
enabled:true
},
xAxis:{
type: 'datetime',
type:'category',
// tickmarkPlacement: 'on',
dateTimeLabelFormats: {
millisecond: '%H:%M:%S.%L',
second: '%H:%M',
minute: '%H:%M',
hour: '%H:%M',
day: '%m-%d',
week: '%m-%d',
month: '%Y-%m',
year: '%Y'
},
labels: {
rotation: -45, //倾斜的角度
},

View File

@@ -82,7 +82,7 @@ function showDomainTrans(rs){
var series=new Array();
// $(rs).each(function(i, d) {
series.push({
name: ' ',
name: 'unique',
data: rs[0].count
});
// })