From f6fe894e7723f68395116876d6ab39268d5f3b3a Mon Sep 17 00:00:00 2001 From: tanghao Date: Thu, 3 Jan 2019 16:48:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AF=BC=E5=87=BApng=20pdf?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../highcharts/js/offline-exporting.js | 4 -- .../webapp/static/pages/scripts/echart.js | 44 ++++++++++++++++++- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/static/global/plugins/highcharts/js/offline-exporting.js b/src/main/webapp/static/global/plugins/highcharts/js/offline-exporting.js index 622210fc4..58f5440fb 100644 --- a/src/main/webapp/static/global/plugins/highcharts/js/offline-exporting.js +++ b/src/main/webapp/static/global/plugins/highcharts/js/offline-exporting.js @@ -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: { diff --git a/src/main/webapp/static/pages/scripts/echart.js b/src/main/webapp/static/pages/scripts/echart.js index b751f0b05..03e82deed 100644 --- a/src/main/webapp/static/pages/scripts/echart.js +++ b/src/main/webapp/static/pages/scripts/echart.js @@ -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: {//设置字体颜色