diff --git a/frontend/components/admin/dashboard/CanvasElement.tsx b/frontend/components/admin/dashboard/CanvasElement.tsx index 33b1d801..fbdbfc73 100644 --- a/frontend/components/admin/dashboard/CanvasElement.tsx +++ b/frontend/components/admin/dashboard/CanvasElement.tsx @@ -353,9 +353,9 @@ export function CanvasElement({ let newX = resizeStart.elementX; let newY = resizeStart.elementY; - // 최소 크기 설정: 달력은 2x3, 나머지는 2x2 - const minWidthCells = 2; - const minHeightCells = element.type === "widget" && element.subtype === "calendar" ? 3 : 2; + // 최소 크기 설정: 모든 위젯 1x1 + const minWidthCells = 1; + const minHeightCells = 1; const minWidth = cellSize * minWidthCells; const minHeight = cellSize * minHeightCells; diff --git a/frontend/components/admin/dashboard/charts/ChartRenderer.tsx b/frontend/components/admin/dashboard/charts/ChartRenderer.tsx index 94efd190..3cd5afbe 100644 --- a/frontend/components/admin/dashboard/charts/ChartRenderer.tsx +++ b/frontend/components/admin/dashboard/charts/ChartRenderer.tsx @@ -242,12 +242,12 @@ export function ChartRenderer({ element, data, width, height = 200 }: ChartRende // D3 차트 렌더링 const actualWidth = width !== undefined ? width : containerWidth; - // 원형 차트는 더 큰 크기가 필요 (최소 400px) + // 최소 크기 제약 완화 (1x1 위젯 지원) const isCircularChart = element.subtype === "pie" || element.subtype === "donut"; - const minWidth = isCircularChart ? 400 : 200; - const finalWidth = Math.max(actualWidth - 20, minWidth); - // 원형 차트는 범례 공간을 위해 더 많은 여백 필요 - const finalHeight = Math.max(height - (isCircularChart ? 60 : 20), 300); + const minWidth = 35; // 최소 너비 35px + const finalWidth = Math.max(actualWidth - 4, minWidth); + // 최소 높이도 35px로 설정 + const finalHeight = Math.max(height - (isCircularChart ? 10 : 4), 35); console.log("🎨 ChartRenderer:", { elementSubtype: element.subtype, @@ -263,7 +263,7 @@ export function ChartRenderer({ element, data, width, height = 200 }: ChartRende }); return ( -
+
- +
+ {/* 시계판 배경 */} @@ -70,7 +70,7 @@ export function AnalogClock({ time, theme, timezone, customColor }: AnalogClockP y={y} textAnchor="middle" dominantBaseline="middle" - fontSize="20" + fontSize="16" fontWeight="bold" fill={colors.number} > @@ -86,7 +86,7 @@ export function AnalogClock({ time, theme, timezone, customColor }: AnalogClockP x2={100 + 40 * Math.cos((hourAngle * Math.PI) / 180)} y2={100 + 40 * Math.sin((hourAngle * Math.PI) / 180)} stroke={colors.hourHand} - strokeWidth="6" + strokeWidth="5" strokeLinecap="round" /> @@ -97,7 +97,7 @@ export function AnalogClock({ time, theme, timezone, customColor }: AnalogClockP x2={100 + 60 * Math.cos((minuteAngle * Math.PI) / 180)} y2={100 + 60 * Math.sin((minuteAngle * Math.PI) / 180)} stroke={colors.minuteHand} - strokeWidth="4" + strokeWidth="3" strokeLinecap="round" /> @@ -108,18 +108,18 @@ export function AnalogClock({ time, theme, timezone, customColor }: AnalogClockP x2={100 + 75 * Math.cos((secondAngle * Math.PI) / 180)} y2={100 + 75 * Math.sin((secondAngle * Math.PI) / 180)} stroke={colors.secondHand} - strokeWidth="2" + strokeWidth="1.5" strokeLinecap="round" /> {/* 중심점 */} - - + + {/* 타임존 표시 */} {timezoneLabel && ( -
+
{timezoneLabel}
)} diff --git a/frontend/components/admin/dashboard/widgets/DigitalClock.tsx b/frontend/components/admin/dashboard/widgets/DigitalClock.tsx index eb8b9cba..5ed506c5 100644 --- a/frontend/components/admin/dashboard/widgets/DigitalClock.tsx +++ b/frontend/components/admin/dashboard/widgets/DigitalClock.tsx @@ -56,21 +56,21 @@ export function DigitalClock({ return (
{/* 날짜 표시 (compact 모드에서는 숨김) */} {!compact && showDate && dateString && ( -
{dateString}
+
{dateString}
)} {/* 시간 표시 */} -
+
{timeString}
{/* 타임존 표시 */} -
+
{timezoneLabel}
diff --git a/frontend/components/dashboard/widgets/CustomMetricWidget.tsx b/frontend/components/dashboard/widgets/CustomMetricWidget.tsx index 52c8411c..90d763d0 100644 --- a/frontend/components/dashboard/widgets/CustomMetricWidget.tsx +++ b/frontend/components/dashboard/widgets/CustomMetricWidget.tsx @@ -374,9 +374,9 @@ export default function CustomMetricWidget({ element }: CustomMetricWidgetProps) } return ( -
+
{/* 콘텐츠 영역 - 스크롤 없이 자동으로 크기 조정 */} -
+
{/* 그룹별 카드 (활성화 시) */} {isGroupByMode && groupedCards.map((card, index) => { @@ -388,10 +388,12 @@ export default function CustomMetricWidget({ element }: CustomMetricWidgetProps) return (
-
{card.label}
-
{card.value.toLocaleString()}
+
{card.label}
+
+ {card.value.toLocaleString()} +
); })} @@ -404,12 +406,12 @@ export default function CustomMetricWidget({ element }: CustomMetricWidgetProps) return (
-
{metric.label}
-
+
{metric.label}
+
{formattedValue} - {metric.unit} + {metric.unit}
);