From decd1d43eb6d950442f8ad08af235cb9bc3ba1f2 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 10 Sep 2020 16:22:04 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E8=B0=83=E8=8A=82?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/statistic-analysis/home/home.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/statistic-analysis/home/home.component.ts b/src/app/statistic-analysis/home/home.component.ts index 40d74b9..9885dc8 100644 --- a/src/app/statistic-analysis/home/home.component.ts +++ b/src/app/statistic-analysis/home/home.component.ts @@ -317,8 +317,8 @@ export class HomeComponent implements OnInit { { name: '访问来源', type: 'pie', - radius: '65%', - center: ['50%', '67%'], + radius: '60%', + center: ['50%', '58%'], label:{ show:true, //fontSize:10, @@ -361,8 +361,8 @@ export class HomeComponent implements OnInit { { name: '访问来源', type: 'pie', - radius: '65%', - center: ['50%', '67%'], + radius: '60%', + center: ['50%', '58%'], label:{ show:true, formatter:'{b}\n{d|{c}份}', @@ -402,7 +402,6 @@ export class HomeComponent implements OnInit { //新增、删除单位统计 chartDwsjcj chartDwsjcjOptionsZhi = { - // color: ['#FB33C2', '#00CFF0', '#2C3DE0'], // 标题 title: { text: '新增、删除单位统计', @@ -412,6 +411,7 @@ export class HomeComponent implements OnInit { grid: { left: 30, right: 0, + bottom:20 }, //图例 legend: { From 5363dd7c9906cb44dbd4fa58be0b9a6d5c3fc4af Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 10 Sep 2020 16:41:57 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=94=BE=E5=A4=A7=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/statistic-analysis/home/home.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/statistic-analysis/home/home.component.html b/src/app/statistic-analysis/home/home.component.html index 6409918..f8229c1 100644 --- a/src/app/statistic-analysis/home/home.component.html +++ b/src/app/statistic-analysis/home/home.component.html @@ -2,7 +2,7 @@
-
+
@@ -77,7 +77,7 @@
-
+
@@ -99,7 +99,7 @@
-
+
From 33ead45cff369f75d616559a2f40b91fe3b6ebeb Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 11 Sep 2020 10:14:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=B9=B4=E6=9C=88=E6=9F=A5=E8=AF=A2=20=E6=9B=B4=E6=96=B0echart?= =?UTF-8?q?s=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page-two-time.component.html | 2 +- .../page-two-time/page-two-time.component.ts | 89 +++++++++++++------ 2 files changed, 63 insertions(+), 28 deletions(-) diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html index 89a5e27..758f8c8 100644 --- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html +++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html @@ -11,7 +11,7 @@
- + diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts index 384b231..63012ab 100644 --- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts +++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts @@ -46,12 +46,18 @@ export class PageTwoTimeComponent implements OnInit { selectType:string = 'month'; //选择当前的 查询类型 按月/年 + changeTime (e) { + let data = e.value + this.appEcharts.changeTime(data) + } + //查询数据 years:any = [] selectMonth:any = [1,2,3,4,5,6,7,8,9,10,11,12] tiaoshiPao:any datayuey=[270, 253, 244, 199, 189, 173, 160, 198,200] datayuex=['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'] + //气泡提示数据获取 bianli(){ var arrshuzu='['; @@ -61,8 +67,6 @@ export class PageTwoTimeComponent implements OnInit { arrshuzu=arrshuzu.substring(0,arrshuzu.length-1) arrshuzu+=']' this.tiaoshiPao=JSON.parse(arrshuzu) - console.log(this.tiaoshiPao) - //return tishiPao } //日期初始化 @@ -137,9 +141,11 @@ export class echartsComponent implements OnInit { constructor(public snackBar: MatSnackBar,private adapter: DateAdapter,public echartsData:EchartsDataService) { } tiaoshiPao:any - datayuey=[270, 253, 244, 199, 189, 173, 160, 198,200] + datayuey=[270, 253, 244, 199, 189, 173, 160, 198, 200] datayuex=['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'] - //气泡提示数据获取 + dataYearX = ['2020','2020'] + dataYearY = [1078, 936] + //气泡提示数据获取 bianli(){ var arrshuzu='['; for(var i=0;i{ @@ -178,15 +182,47 @@ export class echartsComponent implements OnInit { this.sixExample.dispose() } + changeTime (e) { + this.oneExample.clear() + this.oneExample.dispose() + this.twoExample.clear() + this.twoExample.dispose() + this.threeExample.clear() + this.threeExample.dispose() + this.fourExample.clear() + this.fourExample.dispose() + this.fiveExample.clear() + this.fiveExample.dispose() + this.sixExample.clear() + this.sixExample.dispose() + + if (e=='year') { + this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.dataYearY,this.dataYearX) + this.oneInit(this.dataYearX,this.dataYearY) + this.twoInit(this.dataYearX,this.dataYearY) + this.threeInit(this.dataYearX,this.dataYearY) + this.fourInit(this.dataYearX,this.dataYearY) + this.fiveInit(this.dataYearX,this.dataYearY) + this.sixInit(this.dataYearX,this.dataYearY) + } else { + this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex) + this.oneInit() + this.twoInit() + this.threeInit() + this.fourInit() + this.fiveInit() + this.sixInit() + } + } + oneExample:any; - oneInit () { + oneInit (X=this.datayuex, Y=this.datayuey) { this.oneExample = echarts.init(document.getElementById('one'),'walden'); var option = { grid: { top: 50, left:40, right: 20, - }, tooltip: { trigger: 'axis', @@ -214,7 +250,7 @@ export class echartsComponent implements OnInit { // x轴 xAxis: { type: 'category', - data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'], + data: X, boundaryGap: true, axisLabel: { color: "#000", //刻度线标签颜色 @@ -251,11 +287,10 @@ export class echartsComponent implements OnInit { name: '单位预案编制数量', type: 'line', markPoint: { - symbolSize:[65, 65], data: this.tiaoshiPao - }, - data: [270, 253, 244, 199, 189, 173, 160, 198,200], + }, + data: Y, } ], }; @@ -263,7 +298,7 @@ export class echartsComponent implements OnInit { } twoExample:any; - twoInit () { + twoInit (X=this.datayuex, Y=this.datayuey) { let that = this this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp'); var option = { @@ -294,7 +329,7 @@ export class echartsComponent implements OnInit { // x轴 xAxis: { type: 'category', - data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'], + data: X, boundaryGap: true, axisLabel: { color: "#000", //刻度线标签颜色 @@ -335,7 +370,7 @@ export class echartsComponent implements OnInit { symbolSize:[65, 65], data: this.tiaoshiPao }, - data: [270, 253, 244, 199, 189, 173, 160, 198,200], + data: Y, } ], }; @@ -347,7 +382,7 @@ export class echartsComponent implements OnInit { } threeExample:any; - threeInit () { + threeInit (X=this.datayuex, Y=this.datayuey) { let that = this this.threeExample = echarts.init(document.getElementById('three'), 'skinUpp'); var option = { @@ -377,7 +412,7 @@ export class echartsComponent implements OnInit { // x轴 xAxis: { type: 'category', - data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'], + data: X, boundaryGap: true, axisLabel: { color: "#000", //刻度线标签颜色 @@ -418,7 +453,7 @@ export class echartsComponent implements OnInit { symbolSize:[65, 65], data: this.tiaoshiPao }, - data: [270, 253, 244, 199, 189, 173, 160, 198,200], + data: Y, } ], }; @@ -430,7 +465,7 @@ export class echartsComponent implements OnInit { } fourExample:any; - fourInit () { + fourInit (X=this.datayuex, Y=this.datayuey) { let that = this this.fourExample = echarts.init(document.getElementById('four'), 'skinUpp'); var option = { @@ -461,7 +496,7 @@ export class echartsComponent implements OnInit { // x轴 xAxis: { type: 'category', - data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'], + data: X, boundaryGap: true, axisLabel: { color: "#000", //刻度线标签颜色 @@ -502,7 +537,7 @@ export class echartsComponent implements OnInit { symbolSize:[65, 65], data: this.tiaoshiPao }, - data: [270, 253, 244, 199, 189, 173, 160, 198,200], + data: Y, } ], }; @@ -514,7 +549,7 @@ export class echartsComponent implements OnInit { } fiveExample:any; - fiveInit () { + fiveInit (X=this.datayuex, Y=this.datayuey) { let that = this this.fiveExample = echarts.init(document.getElementById('five'), 'skinUpp'); var option = { @@ -546,7 +581,7 @@ export class echartsComponent implements OnInit { // x轴 xAxis: { type: 'category', - data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'], + data: X, boundaryGap: true, axisLabel: { color: "#000", //刻度线标签颜色 @@ -587,7 +622,7 @@ export class echartsComponent implements OnInit { symbolSize:[65, 65], data: this.tiaoshiPao }, - data: [270, 253, 244, 199, 189, 173, 160, 198,200], + data: Y, } ], }; @@ -599,7 +634,7 @@ export class echartsComponent implements OnInit { } sixExample:any; - sixInit () { + sixInit (X=this.datayuex, Y=this.datayuey) { let that = this this.sixExample = echarts.init(document.getElementById('six'), 'skinUpp'); var option = { @@ -630,7 +665,7 @@ export class echartsComponent implements OnInit { // x轴 xAxis: { type: 'category', - data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'], + data: X, boundaryGap: true, axisLabel: { color: "#000", //刻度线标签颜色 @@ -671,7 +706,7 @@ export class echartsComponent implements OnInit { symbolSize:[65, 65], data: this.tiaoshiPao }, - data: [270, 253, 244, 199, 189, 173, 160, 198,200], + data: Y, } ], }; From 79a17d04027c8117e2a6f5e17989dc4abf81e48a Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 11 Sep 2020 10:23:26 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[=E4=BF=AE=E6=AD=A3]=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E5=B9=B4=E6=9C=88=E5=88=87=E6=8D=A2BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../state/page-two-time/page-two-time.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts index 63012ab..6b4cd12 100644 --- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts +++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts @@ -37,6 +37,7 @@ export class PageTwoTimeComponent implements OnInit { toggleFalse () { this.isQuery = false this.echartsData.statefulInspectionToggle = true + this.selectType = 'month' } //返回