diff --git a/apps/st/src/components/statistics/verification/ImrVerificationHistory.tsx b/apps/st/src/components/statistics/verification/ImrVerificationHistory.tsx index a43b8942b..3695cf25e 100644 --- a/apps/st/src/components/statistics/verification/ImrVerificationHistory.tsx +++ b/apps/st/src/components/statistics/verification/ImrVerificationHistory.tsx @@ -179,7 +179,7 @@ const ImrVerificationHistory = () => { stAnlsRsltApi.getImrResultList(selectedHistory!.anlsSn, { page: 0, size: 100, - sort: "rsltSn,asc", + sort: "admdstCd,asc", }), enabled: !!selectedHistory, }); diff --git a/apps/st/src/components/statistics/verification/detail/HbVerificationDetail.tsx b/apps/st/src/components/statistics/verification/detail/HbVerificationDetail.tsx index 4ec8b3a39..89a988fda 100644 --- a/apps/st/src/components/statistics/verification/detail/HbVerificationDetail.tsx +++ b/apps/st/src/components/statistics/verification/detail/HbVerificationDetail.tsx @@ -89,7 +89,7 @@ const HbVerificationDetail: React.FC = ({ 검증 결과 상세
-
+
= ({ appliedFilter={appliedFilter} />
-
+
): { + min: number; + max: number; +} | null { + const values: number[] = []; + for (const ds of data.datasets) { + for (const pt of ds.data) { + if (pt && typeof pt === "object" && "x" in pt && "y" in pt) { + const p = pt as LinePoint; + if (Number.isFinite(p.x)) values.push(p.x); + if (Number.isFinite(p.y)) values.push(p.y); + } + } + } + if (values.length === 0) return null; + const min = Math.min(...values); + const max = Math.max(...values); + if (min === max) { + const pad = Math.abs(min) * 0.05 || 1; + return { min: min - pad, max: max + pad }; + } + const padding = (max - min) * 0.02; + return { min: min - padding, max: max + padding }; +} + function matchesAdmdstFilter( admdstCd: string, sidoCd: string | null | undefined, @@ -172,6 +198,8 @@ const ScatterChart: React.FC = ({ ], }; + const axisRange = getUnifiedLinearRange(data); + const options: ChartOptions<"scatter"> = { responsive: true, maintainAspectRatio: false, @@ -230,6 +258,8 @@ const ScatterChart: React.FC = ({ x: { type: "linear", position: "bottom", + min: axisRange?.min, + max: axisRange?.max, title: { display: true, text: "이전년도 값", @@ -237,6 +267,8 @@ const ScatterChart: React.FC = ({ }, y: { type: "linear", + min: axisRange?.min, + max: axisRange?.max, title: { display: true, text: "당해년도 값", @@ -267,7 +299,7 @@ const ScatterChart: React.FC = ({
) : chartConfig ? ( -
+