260202_01_ENH: route 구조 초창기 기획으로 다시 변경 및 Category 별 하위 페이지에 샘플 데이터 모두 적용

This commit is contained in:
2026-02-02 11:32:50 +09:00
parent 4b40c43962
commit 6f8e09bcf3
60 changed files with 1750 additions and 464 deletions

139
src/const/chartConst.ts Normal file
View File

@@ -0,0 +1,139 @@
/**
* 차트 관련 상수 정의
* - 차트 높이, Bar 너비, Grid 설정 등
*/
/**
* 차트 기본 높이 설정
*/
export const CHART_HEIGHTS = {
DEFAULT: 260,
COMPACT: 200,
EXPANDED: 320,
} as const;
/**
* Bar 차트의 Bar 너비 설정
*/
export const BAR_WIDTHS = {
DEFAULT: 42,
NARROW: 30,
WIDE: 60,
} as const;
/**
* 차트 Grid 기본 패딩 설정
*/
export const CHART_GRID_DEFAULTS = {
DEFAULT: {
left: 16,
right: 16,
top: 36,
bottom: 12,
containLabel: true,
},
COMPACT: {
left: 10,
right: 10,
top: 20,
bottom: 8,
containLabel: true,
},
} as const;
/**
* Legend 아이템 크기 설정 (GroupedOverlayBar, GroupedStackBar에서 사용)
*/
export const LEGEND_ITEM_SIZE = {
WIDTH: 25,
HEIGHT: 14,
RADIUS: 4,
} as const;
/**
* 색상 팔레트 설정
*/
export const CHART_COLOR_PALETTES = {
/** 연도별 트렌드 역순 (최신->과거) */
YEAR_TREND_REVERSE: ["--chart-3", "--chart-2", "--chart-1"],
/** LG Red 계열 */
LG_RED_SCALE: ["--lg-red-300", "--lg-red-400", "--lg-red-500"],
/** 연도별 전체 색상 */
YEAR_TOTAL: {
"24": "--chart-total-1",
"25": "--chart-total-2",
"26": "--chart-total-3",
} as const,
/** 연도별 LG 색상 */
YEAR_LG: {
"24": "--chart-lg-1",
"25": "--chart-lg-2",
"26": "--chart-lg-3",
} as const,
/** 연도별 브랜드 색상 (CBrand, Samsung, LG) */
YEAR_BRAND: {
"24": ["--chart-cbrand-1", "--chart-samsung-1", "--chart-lg-1"],
"25": ["--chart-cbrand-2", "--chart-samsung-2", "--chart-lg-2"],
"26": ["--chart-cbrand-3", "--chart-samsung-3", "--chart-lg-3"],
} as const,
} as const;
/**
* 테이블 색상 설정
*/
export const TABLE_COLORS = {
/** 게이지 테이블 색상 */
GAUGE: {
FILL: "hsl(var(--lg-gray-200) / 0.85)",
TRACK: "hsl(var(--lg-pink-300) / 0.2)",
},
/** Sign 표기 셀 배경색 */
SIGN_CELL: {
POSITIVE: "hsl(var(--primary) / 0.08)",
NEGATIVE: "hsl(var(--info) / 0.08)",
ZERO: "hsl(var(--lg-gray-200) / 0.6)",
},
} as const;
/**
* 테이블 크기 설정
*/
export const TABLE_DIMENSIONS = {
CELL_HEIGHT: {
DEFAULT: 26,
COMPACT: 20,
EXPANDED: 32,
},
MIN_WIDTH: {
STANDARD: 1600,
COMPACT: 1200,
WIDE: 2000,
},
} as const;
/**
* 차트/테이블 라벨 텍스트
*/
export const CHART_LABELS = {
TOTAL: "전체",
LG: "LG",
GAP: "전년 대비 GAP(%)",
CAGR: "CAGR(%)",
SAMPLE_COUNT: "(사례수)",
} as const;
/**
* 차트 제목 텍스트
*/
export const CHART_TITLES = {
LG_PENETRATION: "LG제품 보급률",
TOTAL_PENETRATION: "전체 보급률",
LG_PURCHASE: "LG제품 구매율",
TOTAL_PURCHASE: "전체 구매율",
BRAND_SHARE: "브랜드별 점유율",
} as const;