Files
smart-fin-chart/js/charts/index.js
T
2026-08-28 09:30:13 +08:00

47 lines
1.8 KiB
JavaScript

import { inventoryChart } from './inventory.js';
import { marginChart } from './margin.js';
import { twoLineChart } from './twoline.js';
import { growthChart } from './growth.js';
import { fxChart } from './fx.js';
import { assetsChart } from './ppmt_assets.js';
import { profitChart } from './ppmt_profit.js';
import { ipChart } from './ppmt_ip.js';
import { categoryChart } from './ppmt_category.js';
import { sankeyChart } from './ppmt_sankey.js';
import { regionChannelYoyChart } from './ppmt_region_yoy.js';
import { ppmtGrowthChart } from './ppmt_growth.js';
import { ppmtMarginsChart } from './ppmt_margins.js';
import { ppmtBridgeChart } from './ppmt_bridge.js';
import { ppmtCoreProfitChart } from './ppmt_core_profit.js';
import { ppmtCoreMarginChart } from './ppmt_core_margin.js';
import { ppmtIpShareChart } from './ppmt_ip_share.js';
import { ppmtIpShareHistoryChart } from './ppmt_ip_share_history.js';
import { ppmtIpExMonstersChart } from './ppmt_ip_ex_monsters.js';
/** 图表构建函数注册表。manifest 只引用这里的 key,不直接引用 JS 函数。 */
export const chartRegistry = {
'demo-inventory': inventoryChart,
'demo-margin': marginChart,
'demo-twoline': twoLineChart,
'demo-growth': growthChart,
'demo-fx': fxChart,
'ppmt-assets': assetsChart,
'ppmt-profit': profitChart,
'ppmt-ip': ipChart,
'ppmt-category': categoryChart,
'ppmt-sankey': sankeyChart,
'ppmt-region-yoy': regionChannelYoyChart,
'ppmt-growth': ppmtGrowthChart,
'ppmt-margins': ppmtMarginsChart,
'ppmt-bridge': ppmtBridgeChart,
'ppmt-core-profit': ppmtCoreProfitChart,
'ppmt-core-margin': ppmtCoreMarginChart,
'ppmt-ip-share': ppmtIpShareChart,
'ppmt-ip-share-history': ppmtIpShareHistoryChart,
'ppmt-ip-ex-monsters': ppmtIpExMonstersChart,
};
export function getChartBuilder(key) {
return chartRegistry[key];
}