style: 柱图三色换成降饱和柔和版,柔蓝/柔绿/柔红,图例同步
This commit is contained in:
@@ -27,9 +27,9 @@ function getShareColor(share, targets, airYear) {
|
||||
if (isNaN(n)) return '#999'
|
||||
const stretch = Number(target.stretch_target)
|
||||
const base = Number(target.base_target)
|
||||
if (n > stretch) return '#cf1322' // 红=超过摸高目标(优秀)
|
||||
if (n >= base) return '#6b8e6b' // 蓝=未达摸高目标(达标)
|
||||
return '#d4a017' // 绿=未达基础目标(待提升)
|
||||
if (n > stretch) return '#c0584f' // 红=超过摸高目标(优秀)
|
||||
if (n >= base) return '#5b8db8' // 蓝=未达摸高目标(达标)
|
||||
return '#7aa874' // 绿=未达基础目标(待提升)
|
||||
}
|
||||
|
||||
function getBarHeight(share) {
|
||||
@@ -186,9 +186,9 @@ function Dashboard() {
|
||||
})}
|
||||
</div>
|
||||
<div className="chart-legend">
|
||||
<span className="legend-item"><span className="dot" style={{ background: '#d4a017' }}></span>绿=未达基础目标(待提升)</span>
|
||||
<span className="legend-item"><span className="dot" style={{ background: '#6b8e6b' }}></span>蓝=未达摸高目标(达标)</span>
|
||||
<span className="legend-item"><span className="dot" style={{ background: '#cf1322' }}></span>红=超过摸高目标(优秀)</span>
|
||||
<span className="legend-item"><span className="dot" style={{ background: '#7aa874' }}></span>绿=未达基础目标(待提升)</span>
|
||||
<span className="legend-item"><span className="dot" style={{ background: '#5b8db8' }}></span>蓝=未达摸高目标(达标)</span>
|
||||
<span className="legend-item"><span className="dot" style={{ background: '#c0584f' }}></span>红=超过摸高目标(优秀)</span>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user