|
@@ -97,15 +97,20 @@ export default {
|
|
|
item.properties.centroid || item.properties.center
|
|
|
})
|
|
|
const newData = []
|
|
|
+ const retData = []
|
|
|
mydata.map((item) => {
|
|
|
- if (cityCenter[item.name]) {
|
|
|
+ if (cityCenter[item.provinceName]) {
|
|
|
newData.push({
|
|
|
- name: item.name,
|
|
|
- value: cityCenter[item.name].concat(item.value)
|
|
|
+ name: item.provinceName,
|
|
|
+ value: cityCenter[item.provinceName].concat(item.resultQty)
|
|
|
})
|
|
|
}
|
|
|
+ retData.push({
|
|
|
+ name: item.provinceName,
|
|
|
+ value: item.resultQty
|
|
|
+ })
|
|
|
})
|
|
|
- this.init(name, mydata, newData)
|
|
|
+ this.init(name, retData, newData)
|
|
|
},
|
|
|
init (name, data, data2) {
|
|
|
// console.log(data2);
|
|
@@ -133,12 +138,12 @@ export default {
|
|
|
inRange: {
|
|
|
// 渐变颜色,从小到大
|
|
|
color: [
|
|
|
- '#c3d7df',
|
|
|
+ '#1781b5',
|
|
|
+ '#2f90b9',
|
|
|
'#5cb3cc',
|
|
|
- '#8abcd1',
|
|
|
'#66a9c9',
|
|
|
- '#2f90b9',
|
|
|
- '#1781b5'
|
|
|
+ '#8abcd1',
|
|
|
+ '#c3d7df'
|
|
|
]
|
|
|
},
|
|
|
textStyle: {
|
|
@@ -169,7 +174,7 @@ export default {
|
|
|
show: true,
|
|
|
formatter: function (params) {
|
|
|
if (params.data) {
|
|
|
- return params.name + ':' + params.data['value']
|
|
|
+ return params.name + ':' + params.data['value'] + '元'
|
|
|
} else {
|
|
|
return params.name
|
|
|
}
|