Browse Source

[完善]将主题引入静态文件

master
邵佳豪 4 years ago
parent
commit
260d532c96
  1. 2
      angular.json
  2. 74
      src/app/statistic-analysis/home/home.component.ts

2
angular.json

@ -39,7 +39,7 @@
"src/assets/acharts/acharts.min.js", "src/assets/acharts/acharts.min.js",
"src/assets/echarts/echarts.common.min.js", "src/assets/echarts/echarts.common.min.js",
"src/assets/chartstheme/chongqing.js", "src/assets/chartstheme/chongqing.js",
"src/assets/chartstheme/walden.js",
"src/assets/chartstheme/westeros.js", "src/assets/chartstheme/westeros.js",
"src/assets/chartstheme/echarts-skin.js" "src/assets/chartstheme/echarts-skin.js"

74
src/app/statistic-analysis/home/home.component.ts

@ -380,7 +380,7 @@ export class HomeComponent implements OnInit {
//新增、删除单位统计 //新增、删除单位统计
chartDwsjcj chartDwsjcj
chartDwsjcjOptionsZhi = { chartDwsjcjOptionsZhi = {
color: ['#FB33C2', '#00CFF0', '#2C3DE0'], // color: ['#FB33C2', '#00CFF0', '#2C3DE0'],
// 标题 // 标题
title: { title: {
text: '新增、删除单位统计', text: '新增、删除单位统计',
@ -452,23 +452,6 @@ export class HomeComponent implements OnInit {
position: "top", position: "top",
formatter: '{c}', formatter: '{c}',
color: "#fff", 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: '删除单位', name: '删除单位',
@ -479,29 +462,12 @@ export class HomeComponent implements OnInit {
position: "top", position: "top",
formatter: '{c}', formatter: '{c}',
color: "#fff", 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 = { chartDwsjcjOptionsZhong = {
color: ['#FB33C2', '#00CFF0', '#2C3DE0'], // color: ['#FB33C2', '#00CFF0', '#2C3DE0'],
// 标题 // 标题
title: { title: {
text: '新增、删除单位统计', text: '新增、删除单位统计',
@ -573,23 +539,6 @@ export class HomeComponent implements OnInit {
position: "top", position: "top",
formatter: '{c}', formatter: '{c}',
color: "#fff", 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: '删除单位', name: '删除单位',
@ -600,29 +549,12 @@ export class HomeComponent implements OnInit {
position: "top", position: "top",
formatter: '{c}', formatter: '{c}',
color: "#fff", 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 () { unitData () {
this.chartDwsjcj = echarts.init(document.getElementById('chartDwsjcj'), 'walden'); this.chartDwsjcj = echarts.init(document.getElementById('chartDwsjcj'),'walden');
this.chartDwsjcj.setOption(this.chartDwsjcjOptionsZhi); this.chartDwsjcj.setOption(this.chartDwsjcjOptionsZhi);
this.chartDwsjcj.on("click",(params) => { this.chartDwsjcj.on("click",(params) => {
if(params.seriesName == "新增单位"){ if(params.seriesName == "新增单位"){

Loading…
Cancel
Save