Files
2026-09-24 17:14:03 +08:00

152 lines
7.6 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 { regionChannelYoyTimeseriesChart } from './ppmt_region_channel_yoy_timeseries.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';
import { cashConversionChart } from './ppmt_cash_conversion.js';
import { liquidityWorkingCapitalChart } from './ppmt_liquidity_working_capital.js';
import { cashflowCompositionChart } from './ppmt_cashflow_composition.js';
import { workingCapitalDaysChart } from './ppmt_working_capital_days.js';
import { expenseStructureChart } from './ppmt_expense_structure.js';
import { channelRevenueChart } from './ppmt_channel_revenue.js';
import { channelShareChart } from './ppmt_channel_share.js';
import { makeRegionChannelShareChart, makeRegionChannelAmountChart } from './ppmt_channel_share_region.js';
import { storesRetailChart } from './ppmt_stores_retail.js';
import { storesRobotChart } from './ppmt_stores_robot.js';
import { regionShareChart } from './ppmt_region_share.js';
import { inventoryBalanceChart } from './ppmt_inventory.js';
import { storesRetailShareChart } from './ppmt_stores_retail_share.js';
import { retailStoreRevenueChart } from './ppmt_retail_store_revenue.js';
import { robotStoreRevenueChart } from './ppmt_robot_store_revenue.js';
import { brkHoldingsChart } from './brk_holdings.js';
import {
moutaiProfitabilityAnnualChart, moutaiProfitabilityQuarterlyChart,
moutaiExpenseAnnualChart, moutaiExpenseQuarterlyChart,
moutaiBalanceAnnualChart, moutaiBalanceQuarterlyChart,
moutaiCashflowAnnualChart, moutaiCashflowQuarterlyChart,
moutaiProductAnnualChart, moutaiChannelAnnualChart,
moutaiClassifiedProductQuarterlyChart, moutaiClassifiedChannelQuarterlyChart,
moutaiClassifiedProductCumulativeChart, moutaiClassifiedChannelCumulativeChart,
moutaiRevenueCompositionHalfyearChart, moutaiLiquorIndustryOutputChart,
moutaiBaseWineVolumeChart, moutaiFlyingPriceChart, moutaiPriceAdjustmentChart,
moutaiTonPriceChart, moutaiDividendChart, moutaiDistributorsChart,
} from './moutai.js';
import {
peerInstallChart, peerUtilizationChart, peerShareChart,
peerGpPerWhChart, peerAspChart, peerMarginChart, peer2026h1Chart,
peerGpGapChart, peerGpChangeChart, catlUnitEconomicsChart, catlVolumeGpChart,
globalCrChart, globalTop10Chart, globalRegionShareChart,
} from './catl.js';
import {
sweetCatlPricePeChart, sweetCatlNetCashChart, sweetCatlAnyPriceChart,
sweetTencentPriceEvChart, sweetTencentNonOpChart, sweetTencentAnyPriceChart,
} from './sweet_spot.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-region-yoy-timeseries': regionChannelYoyTimeseriesChart,
'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,
'ppmt-cash-conversion': cashConversionChart,
'ppmt-liquidity-working-capital': liquidityWorkingCapitalChart,
'ppmt-cashflow-composition': cashflowCompositionChart,
'ppmt-working-capital-days': workingCapitalDaysChart,
'ppmt-expense-structure': expenseStructureChart,
'ppmt-channel-revenue': channelRevenueChart,
'ppmt-channel-share': channelShareChart,
'ppmt-channel-share-china': makeRegionChannelShareChart('china'),
'ppmt-channel-share-apac': makeRegionChannelShareChart('apac'),
'ppmt-channel-share-americas': makeRegionChannelShareChart('americas'),
'ppmt-channel-share-europe': makeRegionChannelShareChart('europe'),
'ppmt-channel-amount-china': makeRegionChannelAmountChart('china'),
'ppmt-channel-amount-apac': makeRegionChannelAmountChart('apac'),
'ppmt-channel-amount-americas': makeRegionChannelAmountChart('americas'),
'ppmt-channel-amount-europe': makeRegionChannelAmountChart('europe'),
'ppmt-stores-retail': storesRetailChart,
'ppmt-stores-robot': storesRobotChart,
'ppmt-region-share': regionShareChart,
'ppmt-inventory': inventoryBalanceChart,
'ppmt-stores-retail-share': storesRetailShareChart,
'ppmt-retail-store-revenue': retailStoreRevenueChart,
'ppmt-robot-store-revenue': robotStoreRevenueChart,
'brk-holdings': brkHoldingsChart,
'moutai-profitability-annual': moutaiProfitabilityAnnualChart,
'moutai-profitability-quarterly': moutaiProfitabilityQuarterlyChart,
'moutai-expense-annual': moutaiExpenseAnnualChart,
'moutai-expense-quarterly': moutaiExpenseQuarterlyChart,
'moutai-balance-annual': moutaiBalanceAnnualChart,
'moutai-balance-quarterly': moutaiBalanceQuarterlyChart,
'moutai-cashflow-annual': moutaiCashflowAnnualChart,
'moutai-cashflow-quarterly': moutaiCashflowQuarterlyChart,
'moutai-product-annual': moutaiProductAnnualChart,
'moutai-channel-annual': moutaiChannelAnnualChart,
'moutai-classified-product-quarterly': moutaiClassifiedProductQuarterlyChart,
'moutai-classified-channel-quarterly': moutaiClassifiedChannelQuarterlyChart,
'moutai-classified-product-cumulative': moutaiClassifiedProductCumulativeChart,
'moutai-classified-channel-cumulative': moutaiClassifiedChannelCumulativeChart,
'moutai-revenue-composition-halfyear': moutaiRevenueCompositionHalfyearChart,
'moutai-liquor-industry-output': moutaiLiquorIndustryOutputChart,
'moutai-base-wine-volume': moutaiBaseWineVolumeChart,
'moutai-flying-price': moutaiFlyingPriceChart,
'moutai-price-adjustment': moutaiPriceAdjustmentChart,
'moutai-ton-price': moutaiTonPriceChart,
'moutai-dividend': moutaiDividendChart,
'moutai-distributors': moutaiDistributorsChart,
'catl-unit-economics': catlUnitEconomicsChart,
'catl-volume-gp': catlVolumeGpChart,
'peer-install': peerInstallChart,
'peer-utilization': peerUtilizationChart,
'peer-share': peerShareChart,
'peer-gp-per-wh': peerGpPerWhChart,
'peer-asp': peerAspChart,
'peer-margin': peerMarginChart,
'peer-2026h1': peer2026h1Chart,
'peer-gp-gap': peerGpGapChart,
'peer-gp-change': peerGpChangeChart,
'global-cr': globalCrChart,
'global-top10': globalTop10Chart,
'global-region-share': globalRegionShareChart,
'sweet-catl-price-pe': sweetCatlPricePeChart,
'sweet-catl-net-cash': sweetCatlNetCashChart,
'sweet-catl-any-price': sweetCatlAnyPriceChart,
'sweet-tencent-price-ev': sweetTencentPriceEvChart,
'sweet-tencent-non-op': sweetTencentNonOpChart,
'sweet-tencent-any-price': sweetTencentAnyPriceChart,
};
export function getChartBuilder(key) {
return chartRegistry[key];
}