|
|
@ -2,18 +2,18 @@ import React from 'react' |
|
|
|
import Module from '../../../public/module' |
|
|
|
import PieChart from '../chart/pie-chart'; |
|
|
|
|
|
|
|
let colorList = [ |
|
|
|
"rgba(7,185,254,1)", |
|
|
|
"rgba(28,96,254,1)", |
|
|
|
"rgba(4,251,240,1)", |
|
|
|
"rgba(255,194,20,1)" |
|
|
|
] |
|
|
|
let underColorList = [ |
|
|
|
"rgba(7,185,254,0.5)", |
|
|
|
"rgba(28,96,254,0.5)", |
|
|
|
"rgba(4,251,240,0.5)", |
|
|
|
"rgba(255,194,20,0.5)" |
|
|
|
] |
|
|
|
// let colorList = [
|
|
|
|
// "rgba(7,185,254,1)",
|
|
|
|
// "rgba(28,96,254,1)",
|
|
|
|
// "rgba(4,251,240,1)",
|
|
|
|
// "rgba(255,194,20,1)"
|
|
|
|
// ]
|
|
|
|
// let underColorList = [
|
|
|
|
// "rgba(7,185,254,0.5)",
|
|
|
|
// "rgba(28,96,254,0.5)",
|
|
|
|
// "rgba(4,251,240,0.5)",
|
|
|
|
// "rgba(255,194,20,0.5)"
|
|
|
|
// ]
|
|
|
|
|
|
|
|
const type = ['culvert', '', 'road', 'bridge'] |
|
|
|
|
|
|
@ -30,27 +30,37 @@ const RightBottom = (props) => { |
|
|
|
case 'road': |
|
|
|
return { |
|
|
|
name: '道路', |
|
|
|
value: r.count |
|
|
|
value: r.count, |
|
|
|
colorList: 'rgba(7,185,254,1)', |
|
|
|
underColorList: 'rgba(7,185,254,0.5)' |
|
|
|
|
|
|
|
}; |
|
|
|
case 'culvert': |
|
|
|
return { |
|
|
|
name: '涵洞', |
|
|
|
value: r.count |
|
|
|
value: r.count, |
|
|
|
colorList: 'rgba(4,251,240,1)', |
|
|
|
underColorList: 'rgba(4,251,240,0.5)' |
|
|
|
}; |
|
|
|
case 'bridge': |
|
|
|
return { |
|
|
|
name: '桥梁', |
|
|
|
value: r.count |
|
|
|
value: r.count, |
|
|
|
colorList: 'rgba(28,96,254,1)', |
|
|
|
underColorList: 'rgba(28,96,254,0.5)' |
|
|
|
}; |
|
|
|
case 'other': |
|
|
|
return { |
|
|
|
name: '其他', |
|
|
|
value: r.count |
|
|
|
value: r.count, |
|
|
|
colorList: 'rgba(255,194,20,1)', |
|
|
|
underColorList: 'rgba(255,194,20,0.5)' |
|
|
|
}; |
|
|
|
} |
|
|
|
}).filter(f => f !== undefined) |
|
|
|
// const otherNum = totalData - typesNum
|
|
|
|
// otherNum !== null && list?.push({ name: '其他', value: otherNum })
|
|
|
|
console.log('list:',list); |
|
|
|
let colorList = list?.map(c => c.colorList) |
|
|
|
let underColorList =list?.map(c => c.underColorList) |
|
|
|
const style = { height: "31%", marginTop: "3%" } |
|
|
|
return ( |
|
|
|
<> |
|
|
|