|
@@ -424,7 +424,7 @@ export default {
|
|
|
if (!max) return 0
|
|
if (!max) return 0
|
|
|
return Math.max(4, Math.round((Number(value) || 0) / max * 100))
|
|
return Math.max(4, Math.round((Number(value) || 0) / max * 100))
|
|
|
},
|
|
},
|
|
|
- // 时段热力单元格颜色:按相对峰值线性加深(浅蓝 -> 品牌主色 #1677FF)
|
|
|
|
|
|
|
+ // 时段热力单元格颜色:按相对峰值线性加深(浅蓝 → 品牌主色 #0B5FCC,主色加深以满足 AA)
|
|
|
// 文字色随背景动态切换,保证对比度:
|
|
// 文字色随背景动态切换,保证对比度:
|
|
|
// alpha < 0.90 → 深字 var(--adm-text-88),实测 ≥ 4.6:1(AA 达标)
|
|
// alpha < 0.90 → 深字 var(--adm-text-88),实测 ≥ 4.6:1(AA 达标)
|
|
|
// alpha ≥ 0.90 → 白字,实测 3.6~4.1:1(深格粗体数据标签,数据可视化可接受)
|
|
// alpha ≥ 0.90 → 白字,实测 3.6~4.1:1(深格粗体数据标签,数据可视化可接受)
|
|
@@ -434,7 +434,7 @@ export default {
|
|
|
if (!peak || !v) return { background: 'var(--adm-fill)', color: 'var(--adm-text-45)' }
|
|
if (!peak || !v) return { background: 'var(--adm-fill)', color: 'var(--adm-text-45)' }
|
|
|
const ratio = Math.min(1, Number(v) / peak)
|
|
const ratio = Math.min(1, Number(v) / peak)
|
|
|
const alpha = (0.1 + ratio * 0.9).toFixed(3)
|
|
const alpha = (0.1 + ratio * 0.9).toFixed(3)
|
|
|
- const bgColor = `rgba(22, 119, 255, ${alpha})`
|
|
|
|
|
|
|
+ const bgColor = `rgba(11, 95, 204, ${alpha})`
|
|
|
const useLightText = parseFloat(alpha) >= 0.9
|
|
const useLightText = parseFloat(alpha) >= 0.9
|
|
|
return {
|
|
return {
|
|
|
background: bgColor,
|
|
background: bgColor,
|
|
@@ -597,8 +597,8 @@ export default {
|
|
|
itemStyle: { color: this.cssVar('--adm-primary') },
|
|
itemStyle: { color: this.cssVar('--adm-primary') },
|
|
|
areaStyle: {
|
|
areaStyle: {
|
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
- { offset: 0, color: 'rgba(22,119,255,0.18)' },
|
|
|
|
|
- { offset: 1, color: 'rgba(22,119,255,0.01)' }
|
|
|
|
|
|
|
+ { offset: 0, color: 'rgba(11,95,204,0.18)' },
|
|
|
|
|
+ { offset: 1, color: 'rgba(11,95,204,0.01)' }
|
|
|
])
|
|
])
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|