260202_02_ENH: 구매 채널에 온/오프라인 네팅 데이터 추가

This commit is contained in:
2026-02-02 12:30:48 +09:00
parent 6f8e09bcf3
commit 0950679874
2 changed files with 20 additions and 2 deletions

View File

@@ -1,7 +1,12 @@
'use client'
import {useLayoutFilter} from "@/components/layout/LayoutFilterContext";
import {apiOwnershipPathByYear, apiOwnershipTriggerByYear, apiPurchaseChannelByYear} from "@/config/sample.data";
import {
apiOwnershipPathByYear,
apiOwnershipTriggerByYear,
apiPurchaseChannelByYear,
apiPurchaseChannelSummaryByYear
} from "@/config/sample.data";
import {useMemo} from "react";
import {PageData, ServerBannerRow} from "@/types/lg";
import {CategoryByData} from "@/components/lge-dashboard";
@@ -12,7 +17,12 @@ const PurchaseChannel = () => {
const tableDataArray = useMemo<PageData<ServerBannerRow>[]>(() => [
{
title: "구매 채널",
title: "구매 채널(온/오프라인)",
chartMode: "reverseStack",
data: apiPurchaseChannelSummaryByYear.filter(r => !(r.year === 26 && r.rowLabel === "gap")),
},
{
title: "구매 채널(상세)",
chartMode: "horizontal",
data: apiPurchaseChannelByYear.filter(r => !(r.year === 26 && r.rowLabel === "gap")),
chartHeight: 550,

View File

@@ -424,6 +424,14 @@ export const apiPurchaseRateKpis: ServerBannerRow[] = [
bannerRow(26, "gap", 2), // 26-25
];
export const apiPurchaseChannelSummaryByYear: ServerBannerRow[] = [
bannerRow(25, "오프라인", 60),
bannerRow(25, "온라인/홈쇼핑", 40),
bannerRow(26, "오프라인", 59),
bannerRow(26, "온라인/홈쇼핑", 41),
]
/** ---------------------------
* API #13
* year rowLabel total banner