|
|
|
|
@ -85,10 +85,16 @@ export default {
|
|
|
|
|
this.chart = echarts.init(document.getElementById('line-chart'))
|
|
|
|
|
let xAxis = [];
|
|
|
|
|
for (let key in this.data) {
|
|
|
|
|
xAxis.push(this.data[key][0]?.leixing)
|
|
|
|
|
xAxis.push(this.data[key][0]?.date)
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
this.chart.setOption(
|
|
|
|
|
{
|
|
|
|
|
tooltip: {
|
|
|
|
|
axisPointer: {
|
|
|
|
|
type: 'cross'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: xAxis
|
|
|
|
|
@ -100,9 +106,9 @@ export default {
|
|
|
|
|
let data = []
|
|
|
|
|
for (let key in this.data) {
|
|
|
|
|
data.push({
|
|
|
|
|
name: this.data[key][0]?.leixing,
|
|
|
|
|
data: this.data[key].map(i => i.total),
|
|
|
|
|
type: 'line',
|
|
|
|
|
smooth: true,
|
|
|
|
|
type: 'bar',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|