市局: 能力统计金字塔根据值排序
This commit is contained in:
parent
608b6d10ff
commit
aec249624a
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in New Issue