Browse Source

[修改]统计分析柱状图样式修改

tangshan
陈敬瑜 3 years ago
parent
commit
4bc1eae6b9
  1. 4
      src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.scss
  2. 9
      src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts
  3. 2
      src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts
  4. 6
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts
  5. 2
      src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.scss
  6. 5
      src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts
  7. 7
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  8. 8
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts
  9. 2
      src/app/statistic-analysis/echarts-data.service.ts
  10. 15
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
  11. 4
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss
  12. 3
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
  13. 8
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

4
src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.scss

@ -68,11 +68,11 @@
#barEchart{
width: 100%;
@media screen and (max-device-width:1400px){
height: 500px;
height: 600px;
top: 55%;
}
@media screen and (min-device-width:1400px){
height: 550px;
height: 600px;
top: 50%;
}
position: absolute;

9
src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts

@ -123,12 +123,11 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
text: this.time + '' +this.buildingTypeName +`:总数(${this.tabledata[0].totalCount})`,
left: "center",
textStyle: {
fontSize: 30
fontSize: 28
}
},
grid: {
top: 110,
//bottom: 10
bottom:'18%'
},
xAxis: {
id:this.organizationId,
@ -136,8 +135,10 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
data:this.zhiNameData,
axisLabel:{
//this.axisLabel,
interval:0, //坐标刻度之间的显示间隔,默认就可以了(默认是不重叠)
rotate:38, //调整数值改变倾斜的幅度(范围-90到90)
textStyle:{
fontSize :18,
fontSize :15,
color:'#000000'
}

2
src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts

@ -211,7 +211,7 @@ export class AddUnitThreeLineDetailsComponent implements OnInit {
if (this.detailPlanEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.buildingTypeName,'id':this.lastId,'type':this.zhiorbuild}})
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.buildingTypeName,'id':this.lastId,'type':this.zhiorbuild,'year':this.year,month:this.option.xAxis.data[xIndex]}})
//this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':this.option.xAxis.data[xIndex],'buildingTpye':this.buildingTypeName}});
}
});

6
src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts

@ -257,8 +257,8 @@ export class AddUnitTwoTimeComponent implements OnInit {
//console.log(this.tiaoshiPao)
//return tishiPao
}
date2 = ['2020', '2021']
thisYear=new Date().getFullYear()
date2 = ['2020', '2021','2022']
dateNum2 = []
//新增数量统计
@ -457,7 +457,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
}else{
if(this.serviceData.level=='0'||this.serviceData.level=='1'||this.serviceData.level=='2'){
//this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':option.xAxis.data[xIndex],'buildingTpye':this.headname}});
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname,'id':this.lastId,'type':this.zhiorbuild}})
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname,'id':this.lastId,'type':this.zhiorbuild,'year':this.thisYear,'month':option.xAxis.data[xIndex]}})
}
}

2
src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.scss

@ -36,7 +36,7 @@
transform: translate(-50%,-50%);
@media screen and (max-device-width:1400px){
height: 500px;
top: 55%;
top: 50%;
}
@media screen and (min-device-width:1400px){
height: 550px;

5
src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts

@ -120,7 +120,7 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
}
},
grid: {
top: 110,
bottom: '23%',
//bottom: 10
},
xAxis: {
@ -129,8 +129,9 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
data: this.zhongNameData,
axisLabel:{
//this.axisLabel,
rotate:38,
textStyle:{
fontSize :18,
fontSize :15,
color:'#000000'
}

7
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts

@ -336,11 +336,12 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
}
asixLable={
interval: 0,
rotate:38,
textStyle:{
fontSize :18,
fontSize :15,
color:'#000000'
},
formatter:function(value)
/* formatter:function(value)
{
var ret = "";//拼接加\n返回的类目项
var maxLength =4;//每项显示文字个数
@ -361,7 +362,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
else {
return value;
}
}
} */
}
barEcharts(){

8
src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts

@ -67,6 +67,7 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
}
axisLabel = {
interval: 0,
rotate:38,
textStyle:{
fontSize :16,
color:'#000000'
@ -280,8 +281,8 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
}
},
grid: {
top: 90,
bottom: 30,
//top: 90,
bottom: '18%',
},
xAxis: {
id:this.organizationId,
@ -290,8 +291,9 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
axisLabel:{
//this.axisLabel,
interval: 0,
rotate:28,
textStyle:{
fontSize :18,
fontSize :16,
color:'#000000'
}

2
src/app/statistic-analysis/echarts-data.service.ts

@ -426,7 +426,7 @@ export class EchartsDataService {
countall+=this.tishiData[i].count
}
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:14px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
this.res+='<thead style="font-size:18px;"><tr>';
this.res+='<td style="text-align:center;width:30%;">名称</td>';
this.res+='<td style="text-align:center;width:30%;">数量</td>'

15
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts

@ -222,7 +222,7 @@ export class ScheduledUpdatesComponent implements OnInit {
countall+=this.tishiData[i].count
}
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:14px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
this.res+='<thead style="font-size:18px;"><tr>';
this.res+='<td style="text-align:center;width:30%;">名称</td>';
this.res+='<td style="text-align:center;width:30%;">数量</td>'
@ -481,8 +481,8 @@ export class verifiedComponent implements OnInit {
let Parameters={
MaintainedState:this.route.snapshot.queryParams.type,
TimeType:this.echartsData.TimeType,
TimeStart:this.echartsData.TimeType==0?selectStartYear+'-'+selectStartMonth:this.echartsData.dateYear+'-'+selectStartMonth,
TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:this.echartsData.dateYear+'-'+selectEndMonth,
TimeStart:this.echartsData.TimeType==0?selectStartYear+'-'+selectStartMonth:this.echartsData.dateYear+'-'+'01',
TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:this.echartsData.dateYear+'-'+'12',
//OrganizationId
}
console.log(this.echartsData.zhiorBuinding)
@ -939,6 +939,7 @@ export class yueDateComponent implements OnInit {
fontSize: 30,
}
},
grid: {
containLabel:true,
top:80,
@ -974,11 +975,12 @@ export class yueDateComponent implements OnInit {
id:this.organizationId,
axisLabel: {
textStyle:{
fontSize :18,
fontSize :15,
color:'#000000'
},
color: "#000", //刻度线标签颜色
interval: 0
interval: 0,
rotate:28,
},
//设置坐标轴字体颜色和宽度
axisLine: {
@ -1204,6 +1206,8 @@ export class yuebuildingDateComponent implements OnInit {
},
type: 'value',
axisLabel: {
interval:0, //坐标刻度之间的显示间隔,默认就可以了(默认是不重叠)
rotate:38 , //调整数值改变倾斜的幅度(范围-90到90)
textStyle:{
fontSize :18,
color:'#000000'
@ -1225,6 +1229,7 @@ export class yuebuildingDateComponent implements OnInit {
// }
// }
],
series: [
{
name: this.echartsData.zhuXname[1],

4
src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss

@ -21,9 +21,9 @@
overflow: auto;
#pie{
width: 100%;
height: 550px;
height: 700px;
@media screen and (max-device-width:1400px){
top: 65%;
top: 55%;
}
@media screen and (min-device-width:1400px){
top: 55%;

3
src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts

@ -155,10 +155,11 @@ export class PageTwoNameComponent implements OnInit {
axisLabel:this.padHw?this.axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
fontSize :14,
color:'#000000'
},
interval: 0,
rotate:38,
},
},
yAxis: {

8
src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

@ -68,13 +68,14 @@ export class PageTwoTimeComponent implements OnInit {
this.echartsData.selectType=0
}
else if(e.value=='year'){
this.years=[]
this.years=[2020,2021,2022]
this.echartsData.selectType=2
/* console.log(this.appEcharts.tabledata)
this.appEcharts.tabledata[0].forEach((value,index,array) => {
this.years.push(array[index].year)
});
this.years=Array.from(new Set(this.years))
//console.log()
//this.years=Array.from(new Set(this.years))
console.log(this.years) */
}
}
@ -336,6 +337,7 @@ export class echartsComponent implements OnInit {
headtext
twoExample:any;
tabledata
thisYear=new Date().getFullYear()
twoInit (X, Y) {
/* X.forEach((element,index,array) => {
array[index]=array[index]+'月'

Loading…
Cancel
Save