From b05a13b02e6e5b1875470f9e31ca9713f6b5b688 Mon Sep 17 00:00:00 2001 From: ljpark Date: Mon, 15 Dec 2025 14:32:16 +0900 Subject: [PATCH] =?UTF-8?q?cm:=20reuse-chart=20=EC=99=B8=20=EB=94=94?= =?UTF-8?q?=EC=9E=90=EC=9D=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/dashboard/lib/korea-basin-map.tsx | 9 +-- .../pages/dashboard/ui/fo-wqlt-Infl-effl.tsx | 4 +- .../cm/src/pages/dashboard/ui/reuse-chart.tsx | 71 +++++++++++++------ 3 files changed, 55 insertions(+), 29 deletions(-) diff --git a/apps/cm/src/pages/dashboard/lib/korea-basin-map.tsx b/apps/cm/src/pages/dashboard/lib/korea-basin-map.tsx index 714e8ef35..83b8c17c9 100644 --- a/apps/cm/src/pages/dashboard/lib/korea-basin-map.tsx +++ b/apps/cm/src/pages/dashboard/lib/korea-basin-map.tsx @@ -21,12 +21,13 @@ function fmt(n: number) { const mapOperFcltData: mapOperFcltType = { colTitle: {cnt:"개소수",rt:"가동률"}, //헤더 영역 data: [ - // {name: "금강", cnt: 710, rt: 100,}, - // {name: "한강", cnt: 983, rt: 100,}, - // {name: "낙동강", cnt: 1032, rt: 100,}, - // {name: "영산강", cnt: 1261, rt: 100,}, + {name: "금강", cnt: 710, rt: 100,}, + {name: "한강", cnt: 983, rt: 100,}, + {name: "낙동강", cnt: 1032, rt: 100,}, + {name: "영산강", cnt: 1261, rt: 100,}, ] }; + export function KoreaBasinMap() { const stageRef = useRef(null); const svgLayerRef = useRef(null); diff --git a/apps/cm/src/pages/dashboard/ui/fo-wqlt-Infl-effl.tsx b/apps/cm/src/pages/dashboard/ui/fo-wqlt-Infl-effl.tsx index 05f7fe34e..4c01fbdd0 100644 --- a/apps/cm/src/pages/dashboard/ui/fo-wqlt-Infl-effl.tsx +++ b/apps/cm/src/pages/dashboard/ui/fo-wqlt-Infl-effl.tsx @@ -199,8 +199,8 @@ const FoWqltInflEffl: React.FC = () => {

수계별 유입ㆍ방류수질 분석

-
-
+
+
{/* 탭 메뉴 */}
{tabs.map((tab) => ( diff --git a/apps/cm/src/pages/dashboard/ui/reuse-chart.tsx b/apps/cm/src/pages/dashboard/ui/reuse-chart.tsx index d812c938e..de650cfa7 100644 --- a/apps/cm/src/pages/dashboard/ui/reuse-chart.tsx +++ b/apps/cm/src/pages/dashboard/ui/reuse-chart.tsx @@ -155,7 +155,7 @@ const ReuseChart: React.FC = () => { const startSlider = () => { intervalRef.current = setInterval(() => { setActiveIndex(prevIndex => (prevIndex + 1) % chartItems.length); - }, 20000); + }, 30000); }; const stopSlider = () => { @@ -179,35 +179,60 @@ const ReuseChart: React.FC = () => { window.open(process.env.NEXT_PUBLIC_WR, "_blank", "noopener,noreferrer"); }; + const viewportRef = useRef(null); + return (

{chartItems[activeIndex]?.title}

-
-
- {chartItems.map((chart, index) => ( -
- } /> +
+
+ + {/* ✅ 좌표 기준 (절대 이동 X) */} +
+ {/* ✅ 이동 대상 */} +
+ {chartItems.map((chart, index) => ( +
+ } + /> +
+ ))}
- ))} -
- -
- {chartItems.map((_, index) => ( -
+
+ {chartItems.map((_, index) => ( +
+