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

@@ -79,9 +79,10 @@ type BannerSummaryProps = {
data: BannerRow[];
useChart: boolean;
useYear: boolean;
getCellClassName?: (row: BannerRow, column: DataColumn<BannerRow>, rowIndex: number) => string | undefined;
};
const BannerSummary = ({ data, useChart, useYear }: BannerSummaryProps) => {
const BannerSummary = ({ data, useChart, useYear, getCellClassName }: BannerSummaryProps) => {
const {filterValue, registerExcelExporter } = useLayoutFilter();
const debouncedFilterValue = useDebouncedValue<CategoryFilterValue>(filterValue as CategoryFilterValue, 500);
@@ -179,12 +180,14 @@ const BannerSummary = ({ data, useChart, useYear }: BannerSummaryProps) => {
title={sectionRow.specTitle}
columns={sectionRow.columns}
rows={sectionRow.rows}
getCellClassName={getCellClassName}
signStyle={signStyleGap}
chart={
<HorizontalBar
data={sectionRow.chartData}
height="100%"
showFocusLabel="none"
showFocusLabel="all"
labelOptions={{ position: "insideRight", color: "#fff", distance: 4 }}
legend={{ show: false }}
grid={GRID_Y_NOT_PADDING}
xAxis={{ type: "value", show: false }}

View File

@@ -68,6 +68,14 @@ const CategoryByData = ({
cellClassName: "lg-table__rowhead",
width: 120,
},
{
key: "total",
header: `전체`,
headRowSpan: 2,
numeric: true,
cellClassName: "lg-table__rowhead",
width: 120,
},
];
const g = BANNER_GROUP[groupKey];

View File

@@ -26,6 +26,7 @@ type Props<T extends Record<string, unknown>> = {
minWidth?: number;
starUnder30Sample?: boolean;
unitText?: string;
getCellClassName?: (row: T, column: DataColumn<T>, rowIndex: number) => string | undefined;
};
export default function LeftChartTable<T extends Record<string, unknown>>({
@@ -41,7 +42,8 @@ export default function LeftChartTable<T extends Record<string, unknown>>({
minWidth,
starUnder30Sample = true,
unitText = UNIT_TEXT,
}: Props<T>) {
getCellClassName,
}: Readonly<Props<T>>) {
return (
<BaseDataTable
columns={columns}
@@ -59,6 +61,7 @@ export default function LeftChartTable<T extends Record<string, unknown>>({
}}
starUnder30Sample={starUnder30Sample}
unitText={unitText}
getCellClassName={getCellClassName}
mergedCell={{
key: chartCell.key,
content: chart,

View File

@@ -5,7 +5,7 @@ import { cn, parseNumber } from "@/lib/utils";
import type { ChartData, SignStyle, TopChartTableRow } from "../types";
import { CHART_HEIGHTS, TABLE_DIMENSIONS } from "@/components/lge-dashboard/chart/chart.config";
import { UNIT_TEXT } from "@/const/lg-common.const";
import { isCagrRow } from "@/lib/lg-dashboard";
import {isCagrRow, isSampleRow} from "@/lib/lg-dashboard";
import BaseTableHeader from "../table/core/BaseTableHeader";
import { formatSignedValue, getSignTextClass, resolveSignStyle, toRoundedNumber } from "../table/core/table-core.helpers";
@@ -41,7 +41,7 @@ export default function TopChartTable({
signStyle,
fillCAGR = false,
unitText = UNIT_TEXT,
}: TopChartTableProps) {
}: Readonly<TopChartTableProps>) {
const resolvedSignStyle = resolveSignStyle(signStyle, {
positiveTextClassName: "lg-num-pos",
negativeTextClassName: "lg-num-neg",
@@ -93,6 +93,7 @@ export default function TopChartTable({
<tbody>
{rows.map((row, rowIndex) => {
const signRow = !!signStyle?.rowSelector?.(row, rowIndex);
const sampleRow = isSampleRow(row.label ?? "");
const cagrRow = isCagrRow(row.label ?? "");
const rowTotal = parseNumber(row.total);
@@ -104,7 +105,12 @@ export default function TopChartTable({
{categories.map((_, categoryIndex) => {
const rawValue = row.values?.[categoryIndex];
const roundedValue = toRoundedNumber(rawValue);
if(sampleRow){
return <td key={categoryIndex}>{rawValue}</td>;
}
const roundedValue = toRoundedNumber(rawValue, cagrRow? 1 : 0);
if (!signRow) {
if (roundedValue === null) {