diff --git a/packages/common/business_components/src/ui/chart/BarChart.tsx b/packages/common/business_components/src/ui/chart/BarChart.tsx index 04a10e8d9..82499306c 100644 --- a/packages/common/business_components/src/ui/chart/BarChart.tsx +++ b/packages/common/business_components/src/ui/chart/BarChart.tsx @@ -14,27 +14,29 @@ import { Bar, BarChart, CartesianGrid, XAxis } from "recharts"; export default function Chart(props: { chartConfig: ChartConfig; chartData: any[] | undefined; chartTitle: string}) { return ( - + + {props.chartTitle && props.chartTitle !== "" && props.chartTitle !== "undefined" ? (
{props.chartTitle}
): null} - - - - - + + + + value.slice(0, 3)} - /> - }/> - - - - + /> + }/> + + + + +
) } \ No newline at end of file diff --git a/packages/common/business_components/src/ui/chart/DoughnutChart.tsx b/packages/common/business_components/src/ui/chart/DoughnutChart.tsx index 860b98558..336994029 100644 --- a/packages/common/business_components/src/ui/chart/DoughnutChart.tsx +++ b/packages/common/business_components/src/ui/chart/DoughnutChart.tsx @@ -12,7 +12,6 @@ import { ChartTooltipContent, type ChartConfig } from "./lib/chart"; -import type { CSSProperties } from "react"; // eslint-disable-next-line react-refresh/only-export-components export default (props: { chartConfig: ChartConfig; chartData: never[] | undefined; chartTitle:string}) =>{ diff --git a/packages/common/business_components/src/ui/chart/LineBarChart.tsx b/packages/common/business_components/src/ui/chart/LineBarChart.tsx index 8917124d8..b8565c3bf 100644 --- a/packages/common/business_components/src/ui/chart/LineBarChart.tsx +++ b/packages/common/business_components/src/ui/chart/LineBarChart.tsx @@ -77,28 +77,30 @@ const CustomLegend = (props: any) => { export default function LineBarchart(props: { chartConfig: ChartConfig; chartData: any[] | undefined; chartTitle:string }) { return ( - - + + {props.chartTitle && props.chartTitle !== "" && props.chartTitle !== "undefined" ? (
{props.chartTitle}
): null} - - - - - {/* 왼쪽 Y축: lineVal (정상) */} - - {/* 오른쪽 Y축: barVal (위에서 아래로 반전) */} - - } /> - - {/* 바 차트 (오른쪽 Y축 사용, 위에서 아래로) */} - - {/* 라인 차트 (왼쪽 Y축 사용) */} - - - +
+ + + + + {/* 왼쪽 Y축: lineVal (정상) */} + + {/* 오른쪽 Y축: barVal (위에서 아래로 반전) */} + + } /> + + {/* 바 차트 (오른쪽 Y축 사용, 위에서 아래로) */} + + {/* 라인 차트 (왼쪽 Y축 사용) */} + + + +
) diff --git a/packages/common/business_components/src/ui/chart/LineChart.tsx b/packages/common/business_components/src/ui/chart/LineChart.tsx index 1aa0e2b4d..8a1168940 100644 --- a/packages/common/business_components/src/ui/chart/LineChart.tsx +++ b/packages/common/business_components/src/ui/chart/LineChart.tsx @@ -14,41 +14,36 @@ import { CartesianGrid, Line, LineChart, XAxis } from "recharts"; export default function Linechart(props: { chartConfig: ChartConfig; chartData: any[] | undefined; chartTitle:string}) { return ( - + + {props.chartTitle && props.chartTitle !== "" && props.chartTitle !== "undefined" ? (
{props.chartTitle}
): null} - - - - - value.slice(0, 3)} - /> - } - /> - - - +
+ + + + value.slice(0, 3)} + /> + } + /> + + + +
) diff --git a/packages/common/business_components/src/ui/chart/index.tsx b/packages/common/business_components/src/ui/chart/index.tsx index 525979a5a..fc5747f3a 100644 --- a/packages/common/business_components/src/ui/chart/index.tsx +++ b/packages/common/business_components/src/ui/chart/index.tsx @@ -21,31 +21,23 @@ const CHART_FORM = { function MainChart(props: { chartForm: string; chartConfig: any; chartData: any; chartTitle:string; }) { if( props.chartForm == CHART_FORM.BAR ){ return ( -
- - -
+ + ); } else if( props.chartForm == CHART_FORM.LINE ){ return ( -
- - -
+ + ); } else if( props.chartForm == CHART_FORM.DN ){ return ( -
- - -
+ + ); } else if (props.chartForm == CHART_FORM.LINEBAR){ return ( -
- - -
+ + ); } }