Browse Source

修正echarts BUG以及样式

zhuzhou
陈鹏飞 3 years ago
parent
commit
2ebf5df542
  1. 22
      src/app/statistic-analysis/real-monitoring/real-monitoring.component.ts

22
src/app/statistic-analysis/real-monitoring/real-monitoring.component.ts

@ -150,6 +150,7 @@ export class RealMonitoringComponent implements OnInit {
this.leftzhutu.dispose()
this.dateyue = []
this.dateNum = []
this.indexData = []
//this.zhiNameData = []
//this.zhiNumData = []
//this.addyuan = []
@ -240,6 +241,11 @@ export class RealMonitoringComponent implements OnInit {
symbolSize: [65, 65],
data: this.EchartsData.qipao(this.tiaoshiPao, this.dateNum, this.dateyue)
},
itemStyle: {
normal:{
color: "#3E91F9"
}
},
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
},
@ -292,6 +298,9 @@ export class RealMonitoringComponent implements OnInit {
lengthdata = ['二维预案', '三维预案', '文本预案', '其他预案']
rightbingtu() {
this.rightbing = echarts.init(document.getElementById('rightecharts'), 'walden');
if (!this.indexData.length) {
return
}
this.optionRightbing = {
/* title: {
text: `建筑类型统计(${this.count}家)`,
@ -327,6 +336,7 @@ export class RealMonitoringComponent implements OnInit {
},
data: this.lengthdata
},
color: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'],
series: [
{
top: '0',
@ -392,10 +402,10 @@ export class RealMonitoringComponent implements OnInit {
color:'#000000'
},
interval: 0,
//rotate:38
rotate: this.zhiNumData.length >= 10? 60 : 0,
formatter:function(value){
var ret = "";//拼接加\n返回的类目项
var maxLength = 3;//每项显示文字个数
var maxLength = 9;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1) { //如果类目项的文字大于3,
@ -446,8 +456,12 @@ export class RealMonitoringComponent implements OnInit {
symbolSize: [65, 65],
data: this.EchartsData.qipao(this.tiaoshiPao, this.zhiNumData, this.zhiNameData)
},
barWidth :'38',
itemStyle: {
normal:{
color: "#3E91F9"
}
},
barWidth :'38',
//label: this.topTextlabel
}]
};

Loading…
Cancel
Save