解决导出png pdf问题

This commit is contained in:
tanghao
2019-01-03 16:48:11 +08:00
parent a72d23536d
commit f6fe894e77
2 changed files with 42 additions and 6 deletions

View File

@@ -277,13 +277,9 @@ License: www.highcharts.com/license
downloadPNG: {
textKey: "downloadPNG",
onclick: function () {
console.log(this)
console.log(chart_main)
this.legend.itemStyle.color='#000000'
this.exportChartLocal()
this.legend.itemStyle.color='#ffffff'
console.log('ok')
console.log(this)
}
},
downloadJPEG: {

View File

@@ -266,8 +266,23 @@
dataLabels: {
enabled: true,
allowOverlap: true, // 允许数据标签重叠
color:'#000000'
},
},
xAxis: [{
labels: {
style: {
color: '#000000'
}
}
}],
yAxis: [{
labels: {
style: {
color: '#000000'
}
}
}]
}
},
buttons: {
@@ -473,7 +488,7 @@
data: [pktNum,byteLen],
});*/
});
var chart = Highcharts.chart('chart_3',{
var chart = Highcharts.chart('chart_3',{
chart: {
backgroundColor: 'rgba(255, 255, 255, 0)',
plotBackgroundColor:null,
@@ -492,7 +507,32 @@
exporting: {
allowHTML:true,
filename:'App'+addDateName(),
buttons: exportingButton('#415262')
buttons: exportingButton('#415262'),
chartOptions: {
plotOptions: {
series: {
dataLabels: {
enabled: true,
color:'#000000'
}
}
},
xAxis: [{
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
labels: {
style: {
color: '#000000'
}
}
}],
yAxis: [{
labels: {
style: {
color: '#000000'
}
}
}]
}
},
noData:{
style: {//设置字体颜色