diff --git a/angular.json b/angular.json index b7c1f20..b09f8df 100644 --- a/angular.json +++ b/angular.json @@ -39,7 +39,7 @@ "src/assets/acharts/acharts.min.js", "src/assets/echarts/echarts.common.min.js", "src/assets/chartstheme/chongqing.js", - + "src/assets/chartstheme/walden.js", "src/assets/chartstheme/westeros.js", "src/assets/chartstheme/echarts-skin.js" diff --git a/src/app/statistic-analysis/home/home.component.ts b/src/app/statistic-analysis/home/home.component.ts index 6bc8f4b..2ba90dc 100644 --- a/src/app/statistic-analysis/home/home.component.ts +++ b/src/app/statistic-analysis/home/home.component.ts @@ -380,7 +380,7 @@ export class HomeComponent implements OnInit { //新增、删除单位统计 chartDwsjcj chartDwsjcjOptionsZhi = { - color: ['#FB33C2', '#00CFF0', '#2C3DE0'], + // color: ['#FB33C2', '#00CFF0', '#2C3DE0'], // 标题 title: { text: '新增、删除单位统计', @@ -452,23 +452,6 @@ export class HomeComponent implements OnInit { position: "top", formatter: '{c}', color: "#fff", - }, - itemStyle: { - color: { - type: 'linear', - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [{ - offset: 0, - color: 'rgba(254,51,194,1)' // 0% 处的颜色 - }, { - offset: 1, - color: 'rgba(254,51,194,.5)' // 100% 处的颜色 - }], - global: false // 缺省为 false - } } }, { name: '删除单位', @@ -479,29 +462,12 @@ export class HomeComponent implements OnInit { position: "top", formatter: '{c}', color: "#fff", - }, - itemStyle: { - color: { - type: 'linear', - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [{ - offset: 0, - color: 'rgba(0,220,254,1)' // 0% 处的颜色 - }, { - offset: 1, - color: 'rgba(1,104,191,1)' // 100% 处的颜色 - }], - globalCoord: false // 缺省为 false - }, } } ], }; chartDwsjcjOptionsZhong = { - color: ['#FB33C2', '#00CFF0', '#2C3DE0'], + // color: ['#FB33C2', '#00CFF0', '#2C3DE0'], // 标题 title: { text: '新增、删除单位统计', @@ -573,23 +539,6 @@ export class HomeComponent implements OnInit { position: "top", formatter: '{c}', color: "#fff", - }, - itemStyle: { - color: { - type: 'linear', - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [{ - offset: 0, - color: 'rgba(254,51,194,1)' // 0% 处的颜色 - }, { - offset: 1, - color: 'rgba(254,51,194,.5)' // 100% 处的颜色 - }], - global: false // 缺省为 false - } } }, { name: '删除单位', @@ -600,29 +549,12 @@ export class HomeComponent implements OnInit { position: "top", formatter: '{c}', color: "#fff", - }, - itemStyle: { - color: { - type: 'linear', - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [{ - offset: 0, - color: 'rgba(0,220,254,1)' // 0% 处的颜色 - }, { - offset: 1, - color: 'rgba(1,104,191,1)' // 100% 处的颜色 - }], - globalCoord: false // 缺省为 false - }, } } ], }; unitData () { - this.chartDwsjcj = echarts.init(document.getElementById('chartDwsjcj'), 'walden'); + this.chartDwsjcj = echarts.init(document.getElementById('chartDwsjcj'),'walden'); this.chartDwsjcj.setOption(this.chartDwsjcjOptionsZhi); this.chartDwsjcj.on("click",(params) => { if(params.seriesName == "新增单位"){