修复打印字体不显示问题以及格式化时间展示
This commit is contained in:
@@ -4,10 +4,66 @@
|
||||
chart: {
|
||||
events: {
|
||||
beforePrint: function () {
|
||||
chart_main.xAxis[0].update({
|
||||
labels:{
|
||||
style:{
|
||||
color:'#000000'
|
||||
}
|
||||
}
|
||||
})
|
||||
chart_3.xAxis[0].update({
|
||||
labels:{
|
||||
style:{
|
||||
color:'#000000'
|
||||
}
|
||||
}
|
||||
})
|
||||
chart_main.yAxis[0].update({
|
||||
labels:{
|
||||
style:{
|
||||
color:'#000000'
|
||||
}
|
||||
}
|
||||
})
|
||||
chart_3.yAxis[0].update({
|
||||
labels:{
|
||||
style:{
|
||||
color:'#000000'
|
||||
}
|
||||
}
|
||||
})
|
||||
$('.highcharts-legend text').css('color','#000000');
|
||||
$('.highcharts-legend text').css('fill','#000000');
|
||||
},
|
||||
afterPrint: function () {
|
||||
chart_3.xAxis[0].update({
|
||||
labels:{
|
||||
style:{
|
||||
color:'#ffffff'
|
||||
}
|
||||
}
|
||||
})
|
||||
chart_main.xAxis[0].update({
|
||||
labels:{
|
||||
style:{
|
||||
color:'#ffffff'
|
||||
}
|
||||
}
|
||||
})
|
||||
chart_main.yAxis[0].update({
|
||||
labels:{
|
||||
style:{
|
||||
color:'#ffffff'
|
||||
}
|
||||
}
|
||||
})
|
||||
chart_3.yAxis[0].update({
|
||||
labels:{
|
||||
style:{
|
||||
color:'#ffffff'
|
||||
}
|
||||
}
|
||||
})
|
||||
$('.highcharts-legend text').css('color','#ffffff');
|
||||
$('.highcharts-legend text').css('fill','#ffffff');
|
||||
}
|
||||
@@ -67,6 +123,9 @@
|
||||
allowHTML:true,
|
||||
filename:'Protocol-Type'+addDateName(),
|
||||
chartOptions: {
|
||||
chart:{
|
||||
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
dataLabels: {
|
||||
@@ -240,7 +299,7 @@
|
||||
data: [pktNum,byteLen],
|
||||
});*/
|
||||
});
|
||||
var chart = Highcharts.chart('chart_main', {
|
||||
chart_main = Highcharts.chart('chart_main', {
|
||||
chart: {
|
||||
backgroundColor: 'rgba(255, 255, 255, 0)',
|
||||
plotBackgroundColor:null,
|
||||
@@ -268,25 +327,25 @@
|
||||
series: {
|
||||
dataLabels: {
|
||||
enabled: true,
|
||||
allowOverlap: true, // 允许数据标签重叠
|
||||
color:'#000000'
|
||||
},
|
||||
},
|
||||
xAxis: [{
|
||||
labels: {
|
||||
style: {
|
||||
color: '#000000'
|
||||
}
|
||||
color:'#000000'
|
||||
}
|
||||
}],
|
||||
yAxis: [{
|
||||
labels: {
|
||||
style: {
|
||||
color: '#000000'
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: [{
|
||||
categories: xData,
|
||||
labels: {
|
||||
style: {
|
||||
color: '#000000'
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}],
|
||||
yAxis: [{
|
||||
labels: {
|
||||
style: {
|
||||
color: '#000000'
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
buttons: {
|
||||
contextButton: {
|
||||
@@ -491,7 +550,7 @@
|
||||
data: [pktNum,byteLen],
|
||||
});*/
|
||||
});
|
||||
var chart = Highcharts.chart('chart_3',{
|
||||
chart_3 = Highcharts.chart('chart_3',{
|
||||
chart: {
|
||||
backgroundColor: 'rgba(255, 255, 255, 0)',
|
||||
plotBackgroundColor:null,
|
||||
@@ -524,7 +583,7 @@
|
||||
}
|
||||
},
|
||||
xAxis: [{
|
||||
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
categories: xData,
|
||||
labels: {
|
||||
style: {
|
||||
color: '#000000'
|
||||
@@ -691,6 +750,9 @@ function echart_2(rs){
|
||||
allowHTML:true,
|
||||
filename:'BS'+addDateName(),
|
||||
chartOptions: {
|
||||
chart:{
|
||||
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
dataLabels: {
|
||||
@@ -844,6 +906,9 @@ function echart_5(rs){
|
||||
allowHTML:true,
|
||||
filename:'BS'+addDateName(),
|
||||
chartOptions: {
|
||||
chart:{
|
||||
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
dataLabels: {
|
||||
@@ -992,6 +1057,9 @@ function echart_4(rs){
|
||||
allowHTML:true,
|
||||
filename:'Website'+addDateName(),
|
||||
chartOptions: {
|
||||
chart:{
|
||||
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
dataLabels: {
|
||||
@@ -1139,6 +1207,9 @@ function echart_6(rs){
|
||||
allowHTML:true,
|
||||
filename:'Website'+addDateName(),
|
||||
chartOptions: {
|
||||
chart:{
|
||||
backgroundColor: 'rgba(255, 255, 255, 1)'
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
dataLabels: {
|
||||
|
||||
Reference in New Issue
Block a user