260330_01_ENH: 26일자 수정사항 반영(라이프스테이지 중분류 제외)

This commit is contained in:
2026-03-30 13:18:08 +09:00
parent ee8bb13209
commit 7f9465e96f
19 changed files with 203 additions and 94 deletions

View File

@@ -28,7 +28,7 @@ import {
calcGapProductRow, calcTotalBaseRow,
formatRowLabel,
normalizeFilterCondition,
withGapRow, withTotalBaseRow
withGapRow, withTotalBaseRow, wrapSampleRow
} from "@/lib/lg-dashboard";
import {
buildHeader_LifeStageColumns,
@@ -83,21 +83,23 @@ const LGPenetrationPage = () => {
const penetrationRows =
data?.statisticsDataMap?.penetration
.filter((r) => r.rowLabel == `보유`)
.filter((r) => r.rowLabel == `보유` || r.rowLabel == `사례수`)
.map((row) => {
const rowLabel = row.rowLabel == `사례수`? `${formatRowLabel(row.year)} ${row.rowLabel}` : row.year;
return {
...row,
rowLabel: row.year,
rowLabel: rowLabel,
}
}) ?? [];
const penetrationLGRows =
data?.statisticsDataMap?.penetration_lg
.filter((row) => row.rowLabel === `보유`)
.filter((r) => r.rowLabel == `보유` || r.rowLabel == `사례수`)
.map((row) => {
const rowLabel = row.rowLabel == `사례수`? `${formatRowLabel(row.year)} ${row.rowLabel}` : row.year;
return {
...row,
rowLabel: row.year,
rowLabel: rowLabel,
}
}) ?? [];
@@ -122,8 +124,9 @@ const LGPenetrationPage = () => {
}, [penetrationLGRows]);
const penetrationLGRowsWithGap = useMemo(() => {
const withGap = withGapRow(penetrationLGRows, calcGapProductRow);
return withTotalBaseRow("보급률",penetrationRows, withGap, calcTotalBaseRow);
const withGap = withGapRow(penetrationLGRows, calcGapProductRow, -1, -3);
return withTotalBaseRow("보급률",penetrationRows, wrapSampleRow(withGap, false), calcTotalBaseRow);
}, [penetrationRows, penetrationLGRows]);
const productTableRows = useMemo<TopChartTableRow[]>(() => {