|
@ -27,7 +27,7 @@ const THIRD = "linear-gradient(360deg, rgba(148, 148, 255, 0.1) 0%, rgba(148, 14 |
|
|
const OTHER = "linear-gradient(360deg, rgba(28, 96, 253, 0) 0%, rgba(28, 96, 253, 0.2) 100%)" |
|
|
const OTHER = "linear-gradient(360deg, rgba(28, 96, 253, 0) 0%, rgba(28, 96, 253, 0.2) 100%)" |
|
|
let TOTALS = data?.map(({ name, total }, index) => { |
|
|
let TOTALS = data?.map(({ name, total }, index) => { |
|
|
let max = Math.max(...data.map(item=>item.total)) |
|
|
let max = Math.max(...data.map(item=>item.total)) |
|
|
console.log(data.map(item=>item.total),'好朋友吗') |
|
|
// console.log(data.map(item=>item.total),'好朋友吗')
|
|
|
return { |
|
|
return { |
|
|
name, |
|
|
name, |
|
|
value: total, |
|
|
value: total, |
|
@ -38,7 +38,7 @@ let new_TOTALS = TOTALS && TOTALS.length > 10 ? TOTALS.slice(0, 10) : TOTALS |
|
|
function Cell(props) { |
|
|
function Cell(props) { |
|
|
const { name, rank, value, percent, style = {},cebg } = props |
|
|
const { name, rank, value, percent, style = {},cebg } = props |
|
|
let bg = RNAKS[rank] || OTHER |
|
|
let bg = RNAKS[rank] || OTHER |
|
|
console.log(percent,'百分比') |
|
|
// console.log(percent,'百分比')
|
|
|
return <div style={{ |
|
|
return <div style={{ |
|
|
width: "100%", height: 34, display: "flex", justifyContent: 'center', |
|
|
width: "100%", height: 34, display: "flex", justifyContent: 'center', |
|
|
alignItems: "center", marginTop: 7, marginBottom: 7, |
|
|
alignItems: "center", marginTop: 7, marginBottom: 7, |
|
|