Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,11 +67,11 @@ if uploaded_file:
|
|
| 67 |
fig2 = px.line(monthly_expenses, x=monthly_expenses.index, y=monthly_expenses.values, title="Monthly Expenses", labels={"x": "Month", "y": "Amount ($)"})
|
| 68 |
st.plotly_chart(fig2)
|
| 69 |
|
| 70 |
-
# 3. Monthly Spending vs Budget (Bar Chart)
|
| 71 |
monthly_expenses_df = pd.DataFrame({
|
| 72 |
'Actual': monthly_expenses,
|
| 73 |
'Budget': [sum(budgets.values())] * len(monthly_expenses) # Same budget for simplicity
|
| 74 |
})
|
| 75 |
|
| 76 |
-
fig3 =
|
| 77 |
-
st.
|
|
|
|
| 67 |
fig2 = px.line(monthly_expenses, x=monthly_expenses.index, y=monthly_expenses.values, title="Monthly Expenses", labels={"x": "Month", "y": "Amount ($)"})
|
| 68 |
st.plotly_chart(fig2)
|
| 69 |
|
| 70 |
+
# 3. Monthly Spending vs Budget (Bar Chart with Plotly)
|
| 71 |
monthly_expenses_df = pd.DataFrame({
|
| 72 |
'Actual': monthly_expenses,
|
| 73 |
'Budget': [sum(budgets.values())] * len(monthly_expenses) # Same budget for simplicity
|
| 74 |
})
|
| 75 |
|
| 76 |
+
fig3 = px.bar(monthly_expenses_df, x=monthly_expenses_df.index, y=["Actual", "Budget"], title="Monthly Spending vs Budget", labels={"x": "Month", "y": "Amount ($)"})
|
| 77 |
+
st.plotly_chart(fig3)
|