feat: 泡泡玛特增加年度、半年数据区分
This commit is contained in:
+26
@@ -108,6 +108,32 @@ export const periodAxis = {
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* 独立期间轴:FY 为全年,H1/H2 为单独半年。
|
||||
* 用于已拆分累计值的多时间维度图,避免把 H2 错写为全年。
|
||||
*/
|
||||
export function shortStandalonePeriod(label) {
|
||||
return String(label)
|
||||
.replace(/^20(\d{2})FY$/, '$1全年')
|
||||
.replace(/^20(\d{2})/, '$1');
|
||||
}
|
||||
|
||||
export const standalonePeriodAxis = {
|
||||
...categoryAxis,
|
||||
axisLabel: {
|
||||
...categoryAxis.axisLabel,
|
||||
formatter: shortStandalonePeriod,
|
||||
},
|
||||
};
|
||||
|
||||
export function financialViewLabel(view) {
|
||||
return ({ all: '全部期间', annual: '年度', halfyear: '半年', quarter: '季度' })[view] || '全部期间';
|
||||
}
|
||||
|
||||
export function financialViewDisclosure(view) {
|
||||
return '';
|
||||
}
|
||||
|
||||
export const titleStyle = {
|
||||
left: 'center',
|
||||
top: 18,
|
||||
|
||||
Reference in New Issue
Block a user