refactor(energy): drop anomaly coloring on hydrogen daily bars

All bars now use the cyan→blue gradient consistently, matching the
electric daily chart. Anomaly information stays available via the
table row tinting and the trend pills below.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-04-28 12:33:43 +08:00
parent 313325553d
commit 42ec6e1c01

View File

@@ -129,13 +129,9 @@ export default function HydrogenDaily() {
cursor={{ fill: 'rgba(34, 211, 238, 0.06)' }} cursor={{ fill: 'rgba(34, 211, 238, 0.06)' }}
/> />
<Bar dataKey="totalKg" radius={[4, 4, 0, 0]}> <Bar dataKey="totalKg" radius={[4, 4, 0, 0]}>
{trendData.map((r, i) => { {trendData.map((_, i) => (
const isAbnormal = Math.abs(r.chainPct) >= 0.3; <Cell key={i} fill="url(#hydrogenBarGrad)" />
const fill = isAbnormal ))}
? r.chainPct > 0 ? '#10b981' : '#ef4444'
: 'url(#hydrogenBarGrad)';
return <Cell key={i} fill={fill} />;
})}
</Bar> </Bar>
<defs> <defs>
<linearGradient id="hydrogenBarGrad" x1="0" x2="0" y1="0" y2="1"> <linearGradient id="hydrogenBarGrad" x1="0" x2="0" y1="0" y2="1">