feat: 泡泡玛特增加年度、半年数据区分

This commit is contained in:
2026-08-30 14:49:27 +08:00
parent d010b107aa
commit d51890a450
69 changed files with 1109 additions and 258 deletions
+7 -6
View File
@@ -1,17 +1,18 @@
import { col } from '../csv.js';
import {
PALETTE, FONT, axisCommon, periodAxis, titleStyle, legendStyle,
PALETTE, FONT, axisCommon, standalonePeriodAxis, titleStyle, legendStyle,
financialViewDisclosure, financialViewLabel,
lineSeries, footnote, watermarks, LAYOUT,
} from '../theme.js';
/** 泡泡玛特期间费用结构:观察销售投入、管理成本与费用率的规模效应。 */
export function expenseStructureChart(rows, { width, height }) {
export function expenseStructureChart(rows, { width, height, view = 'all' }) {
return {
backgroundColor: '#fff',
title: {
...titleStyle,
text: '泡泡玛特费用结构与费用率(年度)',
subtext: '销售、管理、财务费用;折线为四项费用率',
text: `泡泡玛特费用结构与费用率(${financialViewLabel(view)})`,
subtext: ['销售、管理、财务费用;折线为四项费用率', financialViewDisclosure(view)].filter(Boolean).join('\n'),
},
legend: {
...legendStyle,
@@ -25,7 +26,7 @@ export function expenseStructureChart(rows, { width, height }) {
textStyle: { fontFamily: FONT },
valueFormatter: (value) => value.toFixed(1),
},
xAxis: { ...periodAxis, data: col(rows, 'period') },
xAxis: { ...standalonePeriodAxis, data: col(rows, 'period') },
yAxis: [
{
...axisCommon,
@@ -68,7 +69,7 @@ export function expenseStructureChart(rows, { width, height }) {
],
graphic: [
...watermarks(width, height),
footnote('数据来源:泡泡玛特合并利润表(年度口径)| @思考的Joey'),
footnote('数据来源:泡泡玛特合并利润表;H2为单独半年 | @思考的Joey'),
],
};
}