260209_01_ENH: 테이블에 단위 텍스트 추가, 하단 설명 추가

This commit is contained in:
2026-02-09 16:28:29 +09:00
parent b7282bd07d
commit 6e6120f205
21 changed files with 249 additions and 173 deletions

View File

@@ -8,7 +8,7 @@ import {
GroupedStackBar,
signStyleGapRow,
type TopChartTableRow,
type GroupedStackBarData,
type GroupedStackBarData, BottomDescription,
} from "@/components/lge-dashboard";
import { useLayoutFilter } from "@/components/layout/LayoutFilterContext";
import {apiBrandByYearCategories, apiTrendCategories} from "@/config/sample.data";
@@ -33,6 +33,7 @@ const PenetrationPage = () => {
const productTableRows = useMemo<TopChartTableRow[]>(() => {
return apiTrendCategories.map((row) => ({
label: formatRowLabel(row.rowLabel),
total: row.total,
values: PRODUCT_KEYS.map((k) => (row as any)[k] ?? null),
}));
}, []);
@@ -71,6 +72,15 @@ const PenetrationPage = () => {
return { categories: PRODUCTS, years: YEARS, brands: BRAND_LIST, values };
}, []);
const description = useMemo(() => {
if(isBrandShare){
return "Q. 보유하고 계신 (제품)의 브랜드는 어떻게 되십니까?";
}
return "Q. 다음 중 귀댁에서 보유하고 계신 가전/전자 제품은 무엇입니까? 모두 선택해주세요.<br/>" +
"* 구독/렌탈/선물/경품/아파트 내 빌트인 제품을 모두 포함하여 선택해주세요.";
}, [isBrandShare]);
useEffect(() => {
registerExcelExporter(async () => {
const excelHeader = buildHeader_ProductKeyMap(PRODUCT_KEY_MAP);
@@ -140,7 +150,9 @@ const PenetrationPage = () => {
)
}
signStyle={signStyleGapRow}
fillCAGR={true}
/>
<BottomDescription description={description} />
</div>
);
};