| | |
| | | var ydata = [] |
| | | ydata.push({ name: '符合项', type: 'line', unit: '项', color: '#f07e6f', data: this.staticData1.map(i => i.dcaYesTotal) }) |
| | | ydata.push({ name: '不符合项', type: 'line', unit: '项', color: '#8383ff', data: this.staticData1.map(i => i.dcaNoTotal) }) |
| | | ydata.push({ name: '上报次数', type: 'line', unit: '次', color: '#29aeff', data: this.staticData1.map(i => i.total) }) |
| | | ydata.push({ name: '上报次数', type: 'bar', unit: '次', color: '#29aeff', data: this.staticData1.map(i => i.total) }) |
| | | this.initEchartDataDo('月度统计','echart1', this.staticData1.map(i => i.dateStr), ydata) |
| | | }, |
| | | initEchart11 () { |
| | | var ydata = [] |
| | | ydata.push({ name: '符合项', type: 'bar', unit: '项', color: '#f07e6f', data: this.staticData11.map(i => i.dcaYesTotal) }) |
| | | ydata.push({ name: '不符合项', type: 'bar', unit: '项', color: '#8383ff', data: this.staticData11.map(i => i.dcaNoTotal) }) |
| | | ydata.push({ name: '符合项', type: 'line', unit: '项', color: '#f07e6f', data: this.staticData11.map(i => i.dcaYesTotal) }) |
| | | ydata.push({ name: '不符合项', type: 'line', unit: '项', color: '#8383ff', data: this.staticData11.map(i => i.dcaNoTotal) }) |
| | | ydata.push({ name: '上报次数', type: 'bar', unit: '次', color: '#29aeff', data: this.staticData11.map(i => i.total) }) |
| | | this.initEchartDataDo('季度统计','echart11', this.staticData11.map(i => i.dateStr), ydata) |
| | | }, |
| | |
| | | const myChart = echarts.init(document.getElementById(id)) |
| | | myChart.setOption({ |
| | | title: { |
| | | text: title || '' |
| | | text: (title || '') , |
| | | textStyle:{ |
| | | fontSize: 12, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'bold' |
| | | }, |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | fontSize: 10, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'normal' |
| | | }, |
| | | }, |
| | | legend:{ |
| | | orient: 'vertical', |
| | | left: 'right' |
| | | left: 'right', |
| | | textStyle:{ |
| | | fontSize: 10, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'normal' |
| | | }, |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | |
| | | yAxis: { |
| | | type: 'value', |
| | | name: '', |
| | | textStyle:{ |
| | | fontSize: 10, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'normal' |
| | | }, |
| | | nameTextStyle: { |
| | | padding: [0, 0, 4, -30] // 四个数字分别为上右下左与原位置距离 |
| | | }, |