260828_01_ENH: 조사 개요 타이틀 강조색상 적용, part_item 타이틀 폰트 사이즈 키움

This commit is contained in:
2026-08-28 14:17:15 +09:00
parent 63fc2c1c63
commit e4d29f4adb
3 changed files with 19 additions and 8 deletions

View File

@@ -11,10 +11,11 @@ import { Button } from "@/components/ui/button";
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
import { import {
CHART_BAR_MAX_WIDTH, CHART_BAR_MAX_WIDTH,
CHART_FONT_DEFAULT,
CHART_FONT_SIZE, CHART_FONT_SIZE,
CHART_GAP_MARKER_BG_COLOR, CHART_GAP_MARKER_BG_COLOR,
CHART_GAP_MARKER_TEXT_COLOR, CHART_GAP_MARKER_TEXT_COLOR,
CHART_HEIGHT, CHART_HEIGHT, CHART_LEGEND_FONT_SIZE,
SUBITEM_NEGATIVE_COLOR, SUBITEM_NEGATIVE_COLOR,
} from "@/const/epolicy-dash.const"; } from "@/const/epolicy-dash.const";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
@@ -167,7 +168,7 @@ function ResultGroupChart({ group, item }: { group: ResultGroup; item: Item }) {
label: { label: {
show: true, show: true,
position: "top", position: "top",
fontSize: CHART_FONT_SIZE, ...CHART_FONT_DEFAULT,
formatter: (params: { value: number }) => formatDecimal1(params.value), formatter: (params: { value: number }) => formatDecimal1(params.value),
}, },
...(gapPoints.length ...(gapPoints.length
@@ -186,7 +187,7 @@ function ResultGroupChart({ group, item }: { group: ResultGroup; item: Item }) {
borderRadius: 20, borderRadius: 20,
padding: [10, 10, 7, 10], padding: [10, 10, 7, 10],
fontWeight: "bold", fontWeight: "bold",
fontSize: CHART_FONT_SIZE, ...CHART_FONT_DEFAULT,
formatter: ({ value }: { value: number }) => formatter: ({ value }: { value: number }) =>
`${value >= 0 ? "▲" : "▼"} ${formatDecimal1(Math.abs(value))}%p`, `${value >= 0 ? "▲" : "▼"} ${formatDecimal1(Math.abs(value))}%p`,
}, },
@@ -201,18 +202,18 @@ function ResultGroupChart({ group, item }: { group: ResultGroup; item: Item }) {
}, },
}; };
})} })}
legend={{ right: 0, top: 0, textStyle: { fontSize: CHART_FONT_SIZE } }} legend={{ right: 0, top: 0, textStyle: { fontSize: CHART_LEGEND_FONT_SIZE } }}
grid={{ top: 85, right: 25, bottom: 5, left: 0, containLabel: true }} grid={{ top: 85, right: 25, bottom: 5, left: 0, containLabel: true }}
xAxis={{ xAxis={{
axisLabel: { axisLabel: {
fontSize: CHART_FONT_SIZE, ...CHART_FONT_DEFAULT,
interval: 0, interval: 0,
...(axisLabelWidth ...(axisLabelWidth
? { formatter: (value: string) => wrapLabelByWord(value, axisLabelWidth, CHART_FONT_SIZE) } ? { formatter: (value: string) => wrapLabelByWord(value, axisLabelWidth, CHART_FONT_SIZE) }
: {}), : {}),
}, },
}} }}
yAxis={{ min: 0, max: 100, interval: 25, axisLabel: { fontSize: CHART_FONT_SIZE } }} yAxis={{ min: 0, max: 100, interval: 25, axisLabel: { show: false } }}
barMaxWidth={CHART_BAR_MAX_WIDTH} barMaxWidth={CHART_BAR_MAX_WIDTH}
height={CHART_HEIGHT} height={CHART_HEIGHT}
/> />
@@ -271,7 +272,7 @@ function ItemCard({ item }: { item: Item }) {
return ( return (
<div id={`item-${item.partItemCd}`} className="rounded-lg border bg-card p-6 text-card-foreground shadow-sm"> <div id={`item-${item.partItemCd}`} className="rounded-lg border bg-card p-6 text-card-foreground shadow-sm">
<div className="flex flex-wrap items-center justify-between gap-2"> <div className="flex flex-wrap items-center justify-between gap-2">
<p className="font-medium">{item.title}</p> <p className="font-medium text-xl">{item.title}</p>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Badge <Badge
className={cn( className={cn(

View File

@@ -55,7 +55,7 @@ export default function WaveOverviewPage() {
className="rounded-lg border-2 bg-card p-6 text-card-foreground shadow-sm" className="rounded-lg border-2 bg-card p-6 text-card-foreground shadow-sm"
style={{ borderColor: survey.color }} style={{ borderColor: survey.color }}
> >
<p className="font-semibold" style={{ color: survey.color }}>{survey.title}</p> <p className="font-semibold" style={{ color: survey.highlightColor }}>{survey.title}</p>
<dl className="mt-3 space-y-2"> <dl className="mt-3 space-y-2">
{survey.items.map((item) => ( {survey.items.map((item) => (
<div key={item.title} className="flex gap-3 text-sm"> <div key={item.title} className="flex gap-3 text-sm">

View File

@@ -7,6 +7,16 @@ export const SCROLL_SPY_BOTTOM_TOLERANCE = 8;
// Part 상세 차트 렌더링 설정. dashboard/[waveCd]/[partCd]/page.tsx에서 사용. // Part 상세 차트 렌더링 설정. dashboard/[waveCd]/[partCd]/page.tsx에서 사용.
export const CHART_FONT_SIZE = 16; export const CHART_FONT_SIZE = 16;
export const CHART_LEGEND_FONT_SIZE = 14;
// echarts는 canvas 렌더러라 font-family에 CSS var()를 못 쓴다(셔다워 값을 요소 cascade 없이 자체 파싱해서
// var()가 그대로 무시됨). 본문(html)에 적용되는 --default-font-family(Tailwind 기본 --font-sans)를
// 리터럴로 그대로 옮겨왔다 — globals.css에서 --font-sans를 바꾸면 이 값도 함께 갱신해야 한다.
export const CHART_FONT_FAMILY =
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';
export const CHART_FONT_DEFAULT = {
fontSize: CHART_FONT_SIZE,
fontFamily: CHART_FONT_FAMILY,
};
export const CHART_BAR_MAX_WIDTH = 100; export const CHART_BAR_MAX_WIDTH = 100;
export const CHART_HEIGHT = 320; export const CHART_HEIGHT = 320;