市局: 能力统计金字塔根据值排序

This commit is contained in:
guoyue 2022-10-04 16:00:11 +08:00
parent 608b6d10ff
commit aec249624a
1 changed files with 2 additions and 2 deletions

View File

@ -314,9 +314,9 @@ const funnelPlot = (dataList) => {
let arrCopy = ['0-5', '5-10', '10-15', '15-20', '20以上'] let arrCopy = ['0-5', '5-10', '10-15', '15-20', '20以上']
// //
dataList.sort((a, b) => { dataList.sort((a, b) => {
console.log(arrCopy.indexOf(a.fanwei), arrCopy.indexOf(b.fanwei)) return Number(a.value) - Number(b.value)
return arrCopy.indexOf(b.fanwei) - arrCopy.indexOf(a.fanwei)
}) })
let _arr = dataList.map(v => v.fanwei) || arrCopy; let _arr = dataList.map(v => v.fanwei) || arrCopy;
// //
let chartData = _arr.map((v, i) => { let chartData = _arr.map((v, i) => {