|
@@ -38,7 +38,7 @@ export default {
|
|
|
methods: {
|
|
|
setChart() {
|
|
|
if (!this.chartData) return
|
|
|
- const newArr = this.chartData.yaxis.filter(item => { return item.name !== '全部' })
|
|
|
+ const newArr = this.chartData.yaxis.filter(item => { return item?.name !== '全部' })
|
|
|
const colorArr = ['#409EFF', '#F8CE5C', '#F2904F', '#5EE2BE', '#D873F5', '#7479F5']
|
|
|
let series = null
|
|
|
if (this.chartData.type === '0') {
|
|
@@ -72,7 +72,7 @@ export default {
|
|
|
return backString + `<span style="color: #F04864">总和</span>:${total}个`
|
|
|
}
|
|
|
},
|
|
|
- legend: { data: newArr.map(item => { return item.name }), left: 0, top: 0 },
|
|
|
+ legend: { data: newArr.map(item => { return item?.name }), left: 0, top: 0 },
|
|
|
grid: { left: '0', right: '0', top: '8%', bottom: '0', containLabel: true },
|
|
|
xAxis: { type: 'category', data: this.chartData.xaxis, axisTick: { alignWithLabel: true }, axisLabel: { interval: 0, rotate: 40 }},
|
|
|
yAxis: { type: 'value', axisLine: { show: false }, splitLine: { lineStyle: { type: 'dashed' }}, axisLabel: { formatter: '{value}个' }},
|