Standardize financial chart colors and improve label placement
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { col } from '../csv.js';
|
||||
import {
|
||||
PALETTE, FONT, axisCommon, periodAxis, titleStyle, legendStyle,
|
||||
PALETTE, FINANCIAL_COLORS, FONT, axisCommon, periodAxis, titleStyle, legendStyle,
|
||||
footnote, watermarks, LAYOUT,
|
||||
} from '../theme.js';
|
||||
|
||||
@@ -90,7 +90,7 @@ export function ppmtCoreProfitChart(rows, { width, height }) {
|
||||
yAxisIndex: 0,
|
||||
data: core,
|
||||
barWidth: 32,
|
||||
itemStyle: { color: PALETTE.navy },
|
||||
itemStyle: { color: FINANCIAL_COLORS.netProfit },
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
@@ -107,12 +107,12 @@ export function ppmtCoreProfitChart(rows, { width, height }) {
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: yoy,
|
||||
lineStyle: { color: PALETTE.coral, width: 3.08 }, // 与拆解图毛利率线一致
|
||||
lineStyle: { color: FINANCIAL_COLORS.cashConversion, width: 3.08 },
|
||||
// 空心圆点:白心 + 彩色描边。图例会自动继承这个样式,
|
||||
// 渲染成「短线 + 空心圆」
|
||||
itemStyle: {
|
||||
color: '#fff',
|
||||
borderColor: PALETTE.coral,
|
||||
borderColor: FINANCIAL_COLORS.cashConversion,
|
||||
borderWidth: 2.5, // 与 theme.js lineSeries 一致
|
||||
},
|
||||
symbol: 'circle',
|
||||
@@ -123,7 +123,7 @@ export function ppmtCoreProfitChart(rows, { width, height }) {
|
||||
position: 'top',
|
||||
fontFamily: FONT,
|
||||
fontSize: 11,
|
||||
color: PALETTE.coral,
|
||||
color: FINANCIAL_COLORS.cashConversion,
|
||||
fontWeight: '600',
|
||||
formatter: (p) => {
|
||||
if (p.value === null || p.value === '') return '';
|
||||
|
||||
Reference in New Issue
Block a user