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:
@@ -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%"
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
{/* 결제 방법 차트 추가 */}
|
{/* 결제 방법 차트 추가 */}
|
||||||
|
|||||||
Reference in New Issue
Block a user