Skip to content

Commit ad2661f

Browse files
committed
Add Working Capital Evolution chart in Balance Sheet tab
1 parent b7d0d86 commit ad2661f

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

src/ui/layout.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,15 +308,15 @@ def render_balance_sheet(financial_data, financial_calculations):
308308
x=pd.DatetimeIndex(balance_sheet.index).date,
309309
y=balance_sheet["Total Assets"].values,
310310
name="Total Assets",
311-
marker_color="green",
311+
marker_color="forestgreen",
312312
),
313313
go.Bar(
314314
x=pd.DatetimeIndex(balance_sheet.index).date,
315315
y=balance_sheet[
316316
"Total Liabilities Net Minority Interest"
317317
].values,
318318
name="Total Liabilities",
319-
marker_color="red",
319+
marker_color="tomato",
320320
),
321321
]
322322
)
@@ -333,7 +333,7 @@ def render_balance_sheet(financial_data, financial_calculations):
333333
x=pd.DatetimeIndex(balance_sheet.index).date,
334334
y=balance_sheet["Total Debt"].values,
335335
name="Total Debt",
336-
marker_color="orange",
336+
marker_color="tomato",
337337
)
338338
]
339339
)
@@ -343,7 +343,7 @@ def render_balance_sheet(financial_data, financial_calculations):
343343
st.plotly_chart(fig, use_container_width=True)
344344

345345
with st.container():
346-
invested_capital, liquidity = st.columns(2)
346+
invested_capital, working_capital = st.columns(2)
347347

348348
with invested_capital:
349349
fig = go.Figure(
@@ -352,7 +352,7 @@ def render_balance_sheet(financial_data, financial_calculations):
352352
x=pd.DatetimeIndex(balance_sheet.index).date,
353353
y=balance_sheet["Invested Capital"].values,
354354
name="Invested Capital",
355-
marker_color="green",
355+
marker_color="forestgreen",
356356
)
357357
]
358358
)
@@ -361,8 +361,21 @@ def render_balance_sheet(financial_data, financial_calculations):
361361
)
362362
st.plotly_chart(fig, use_container_width=True)
363363

364-
with liquidity:
365-
st.write("Current Ratio plot")
364+
with working_capital:
365+
fig = go.Figure(
366+
data=[
367+
go.Bar(
368+
x=pd.DatetimeIndex(balance_sheet.index).date,
369+
y=balance_sheet["Working Capital"].values,
370+
name="Working Capital",
371+
marker_color="dodgerblue",
372+
)
373+
]
374+
)
375+
fig.update_layout(
376+
xaxis=dict(type="category"), title="Working Capital Evolution"
377+
)
378+
st.plotly_chart(fig, use_container_width=True)
366379

367380

368381
def render_income_stmt(financial_data, *kwargs):

0 commit comments

Comments
 (0)