Adjust layout of category spending

Adjust the layout of the category spending chart to align vertically with the payment method chart, while keeping the payment method chart's position unchanged.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-22 12:53:08 +00:00
parent eb13fa76a1
commit a138e81439
2 changed files with 7 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ const ExpenseChart: React.FC<ExpenseChartProps> = ({ data }) => {
return ( return (
<div className="neuro-card h-72 desktop-card"> <div className="neuro-card h-72 desktop-card">
<ResponsiveContainer width="100%" height="100%"> <ResponsiveContainer width="100%" height="100%">
<PieChart margin={{ left: 50, right: 30, top: 20, bottom: 20 }}> <PieChart margin={{ left: 30, right: 30, top: 20, bottom: 20 }}>
<Pie <Pie
data={data} data={data}
cx="50%" cx="50%"

View File

@@ -142,12 +142,15 @@ const Analytics = () => {
<MonthlyComparisonChart monthlyData={monthlyData} isEmpty={totalBudget === 0 && totalExpense === 0} /> <MonthlyComparisonChart monthlyData={monthlyData} isEmpty={totalBudget === 0 && totalExpense === 0} />
</div> </div>
{/* Category Pie Chart */} {/* Category Pie Chart - 왼쪽 여백 조정 */}
<h2 className="text-lg font-semibold mb-3"> </h2> <h2 className="text-lg font-semibold mb-3"> </h2>
<div className="w-full mb-8"> <div className="w-full mb-8">
{expenseData.some(item => item.value > 0) ? <ExpenseChart data={expenseData} /> : <div className="neuro-card h-52 w-full flex items-center justify-center text-gray-400"> {expenseData.some(item => item.value > 0) ?
<ExpenseChart data={expenseData} /> :
<div className="neuro-card h-52 w-full flex items-center justify-center text-gray-400">
<p> </p> <p> </p>
</div>} </div>
}
</div> </div>
{/* 결제 방법 차트 추가 */} {/* 결제 방법 차트 추가 */}