fix(FinancialPanorama): 统一营收柱状图颜色为红色
- 将营收与利润趋势图表的柱状图颜色从动态红涨绿跌改为统一红色 - 图例颜色自动与柱子颜色保持一致 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -200,14 +200,7 @@ export const getComparisonChartOption = (
|
|||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: revenueData.map((d) => d.value?.toFixed(2)),
|
data: revenueData.map((d) => d.value?.toFixed(2)),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: (params: { dataIndex: number; value: number }) => {
|
color: '#EF4444', // 统一红色
|
||||||
const idx = params.dataIndex;
|
|
||||||
if (idx === 0) return fui.gold; // 金色作为基准
|
|
||||||
const prevValue = revenueData[idx - 1].value;
|
|
||||||
const currValue = params.value;
|
|
||||||
// 红涨绿跌
|
|
||||||
return currValue >= prevValue ? '#EF4444' : '#10B981';
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user