diff --git a/src/components/lge-dashboard/sub-page/category-page/PurchaseChannel.tsx b/src/components/lge-dashboard/sub-page/category-page/PurchaseChannel.tsx index 321d91a..23fe195 100644 --- a/src/components/lge-dashboard/sub-page/category-page/PurchaseChannel.tsx +++ b/src/components/lge-dashboard/sub-page/category-page/PurchaseChannel.tsx @@ -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[]>(() => [ { - 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, diff --git a/src/config/sample.data.ts b/src/config/sample.data.ts index 77cf207..3c84e5e 100644 --- a/src/config/sample.data.ts +++ b/src/config/sample.data.ts @@ -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