|
@@ -383,7 +383,7 @@ export default {
|
|
|
grid: { left: '0', right: '0', top: '3%', bottom: '0', containLabel: true },
|
|
|
xAxis: [{ type: 'category', data: this.chart1Data.xaxis, axisTick: { alignWithLabel: true }}],
|
|
|
yAxis: [{ type: 'value', axisLine: { show: false }, splitLine: { lineStyle: { type: 'dashed' }}}],
|
|
|
- series: [{ name: '', type: 'bar', barWidth: '20px', data: this.chart1Data.yaxis[0] && this.chart1Data.yaxis[0].data || [] }]
|
|
|
+ series: [{ name: '缺陷统计', type: 'bar', barWidth: '20px', data: this.chart1Data.yaxis[0] && this.chart1Data.yaxis[0].data || [] }]
|
|
|
}
|
|
|
} else {
|
|
|
const newArr = this.chart1Data.xaxis.map((item, index) => {
|
|
@@ -397,7 +397,7 @@ export default {
|
|
|
grid: { left: '0', right: '0', top: '3%', bottom: '0' },
|
|
|
tooltip: { trigger: 'item', formatter: '{a} <br/>{b} : {c} ({d}%)' },
|
|
|
legend: { orient: 'vertical', left: 'right', top: 'center', data: this.chart1Data.xaxis },
|
|
|
- series: [{ name: '', type: 'pie', radius: ['45%', '60%'], right: '30%', label: { position: 'outer', alignTo: 'edge', margin: 20 }, data: newArr }
|
|
|
+ series: [{ name: '缺陷统计', type: 'pie', radius: ['45%', '60%'], right: '30%', label: { position: 'outer', alignTo: 'edge', margin: 20 }, data: newArr }
|
|
|
]
|
|
|
}
|
|
|
}
|
|
@@ -443,7 +443,7 @@ export default {
|
|
|
let total = 0
|
|
|
let backString = ``
|
|
|
params.map((item, index) => {
|
|
|
- total = total + item.value
|
|
|
+ total = (total + item.value).fixed(2)
|
|
|
backString = backString + `<span style="color: ${colorArr[index] || ''}">${item.seriesName}</span>:${item.value}%</br>`
|
|
|
})
|
|
|
backString = backString + `<span style="color: #F04864">总和</span>:${total}%`
|