|
|
@ -5,14 +5,15 @@ var options = { |
|
|
|
confine:true, |
|
|
|
trigger: "axis", |
|
|
|
formatter: (params) => { |
|
|
|
|
|
|
|
let name = params[0].name.replace(/-/g, "") |
|
|
|
let name1 = name+'-济南' |
|
|
|
let name2 = name+'-菏泽' |
|
|
|
// 获取第一个参数的名称并按 '-' 分割
|
|
|
|
let parts = params[0].name.split('-'); |
|
|
|
// let name = params[0].name.replace(/-/g, "")
|
|
|
|
let name1 = parts[0]+"-"+parts[1]+'-济南' |
|
|
|
let name2 = parts[1]+"-"+parts[0]+'-菏泽' |
|
|
|
if(params[0].axisIndex === 1){ |
|
|
|
name1 = name+'-菏泽' |
|
|
|
name2 = name+'-济南' |
|
|
|
} |
|
|
|
name1 = parts[0]+"-"+parts[1]+'-菏泽' |
|
|
|
name2 = parts[1]+"-"+parts[0]+'-济南' |
|
|
|
} |
|
|
|
return `${name1} |
|
|
|
<br/> |
|
|
|
${params[0].marker}${params[0].seriesName}: <span style="font-weight:bold;"> ${params[0].value} 辆</span> |
|
|
@ -48,13 +49,13 @@ var options = { |
|
|
|
itemStyle: { |
|
|
|
color: '#6DBBFB' |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
},{ |
|
|
|
name: "去年同期", |
|
|
|
itemStyle: { |
|
|
|
color: '#5FA52B' |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
@ -312,7 +313,7 @@ var options = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: [ |
|
|
|
195,25, 194, 94, 94, 7, 25, 194, 94, 94, 74, 21, 67, 36, 56, 195, 4, 21, |
|
|
|
195,25, 194, 94, 94, 7, 25, 194, 94, 94, 74, 21, 67, 36, 56, 195, 4, 21, |
|
|
|
], |
|
|
|
}, |
|
|
|
], |
|
|
|