@@ -312,6 +312,7 @@ def render_balance_sheet(financial_data, financial_calculations):
312
312
y = balance_sheet ["Total Assets" ].values ,
313
313
name = "Total Assets" ,
314
314
marker_color = "forestgreen" ,
315
+ marker = dict (cornerradius = "5%" ),
315
316
),
316
317
go .Bar (
317
318
x = balance_sheet .index ,
@@ -320,6 +321,7 @@ def render_balance_sheet(financial_data, financial_calculations):
320
321
].values ,
321
322
name = "Total Liabilities" ,
322
323
marker_color = "tomato" ,
324
+ marker = dict (cornerradius = "5%" ),
323
325
),
324
326
]
325
327
)
@@ -337,6 +339,8 @@ def render_balance_sheet(financial_data, financial_calculations):
337
339
y = balance_sheet ["Total Debt" ].values ,
338
340
name = "Total Debt" ,
339
341
marker_color = "tomato" ,
342
+ marker = dict (cornerradius = "5%" ),
343
+ width = 0.4 ,
340
344
)
341
345
]
342
346
)
@@ -356,6 +360,8 @@ def render_balance_sheet(financial_data, financial_calculations):
356
360
y = balance_sheet ["Invested Capital" ].values ,
357
361
name = "Invested Capital" ,
358
362
marker_color = "forestgreen" ,
363
+ marker = dict (cornerradius = "5%" ),
364
+ width = 0.4 ,
359
365
)
360
366
]
361
367
)
@@ -372,6 +378,8 @@ def render_balance_sheet(financial_data, financial_calculations):
372
378
y = balance_sheet ["Working Capital" ].values ,
373
379
name = "Working Capital" ,
374
380
marker_color = "dodgerblue" ,
381
+ marker = dict (cornerradius = "5%" ),
382
+ width = 0.4 ,
375
383
)
376
384
]
377
385
)
@@ -538,6 +546,107 @@ def render_income_stmt(financial_data, financial_calculations):
538
546
)
539
547
540
548
st .divider ()
549
+
550
+ # Render Charts
551
+ with st .container ():
552
+ income , expenses = st .columns (2 )
553
+
554
+ with income :
555
+ fig = go .Figure (
556
+ data = [
557
+ go .Bar (
558
+ x = income_stmt .index ,
559
+ y = income_stmt ["Net Income" ].values ,
560
+ name = "Net Income" ,
561
+ marker_color = "mediumseagreen" ,
562
+ marker = dict (cornerradius = "5%" ),
563
+ ),
564
+ go .Bar (
565
+ x = income_stmt .index ,
566
+ y = income_stmt ["Operating Income" ].values ,
567
+ name = "Operating Income" ,
568
+ marker_color = "forestgreen" ,
569
+ marker = dict (cornerradius = "5%" ),
570
+ ),
571
+ ]
572
+ )
573
+ fig .update_layout (
574
+ xaxis = dict (type = "category" ),
575
+ title = "Net Income vs Operating Income" ,
576
+ )
577
+ st .plotly_chart (fig , use_container_width = True )
578
+
579
+ with expenses :
580
+ fig = go .Figure (
581
+ data = [
582
+ go .Bar (
583
+ x = income_stmt .index ,
584
+ y = income_stmt ["General And Administrative Expense" ].values ,
585
+ name = "Administrative Expense" ,
586
+ marker_color = "dodgerblue" ,
587
+ marker = dict (cornerradius = "5%" ),
588
+ width = 0.6 ,
589
+ ),
590
+ go .Bar (
591
+ x = income_stmt .index ,
592
+ y = income_stmt ["Selling And Marketing Expense" ].values ,
593
+ name = "Marketing Expense" ,
594
+ marker_color = "lightskyblue" ,
595
+ marker = dict (cornerradius = "5%" ),
596
+ width = 0.6 ,
597
+ ),
598
+ go .Bar (
599
+ x = income_stmt .index ,
600
+ y = income_stmt ["Research And Development" ].values ,
601
+ name = "Research Expense" ,
602
+ marker_color = "steelblue" ,
603
+ marker = dict (cornerradius = "5%" ),
604
+ width = 0.6 ,
605
+ ),
606
+ ]
607
+ )
608
+ fig .update_layout (
609
+ xaxis = dict (type = "category" ), title = "Expenses Breakdown" , barmode = "stack"
610
+ )
611
+ st .plotly_chart (fig , use_container_width = True )
612
+
613
+ with st .container ():
614
+ eps , ebitda = st .columns (2 )
615
+
616
+ with eps :
617
+ fig = go .Figure (
618
+ data = [
619
+ go .Bar (
620
+ x = income_stmt .index ,
621
+ y = income_stmt ["Diluted EPS" ].values ,
622
+ name = "EPS" ,
623
+ marker_color = "forestgreen" ,
624
+ marker = dict (cornerradius = "5%" ),
625
+ width = 0.4 ,
626
+ )
627
+ ]
628
+ )
629
+ fig .update_layout (xaxis = dict (type = "category" ), title = "EPS Evolution" )
630
+ st .plotly_chart (fig , use_container_width = True )
631
+
632
+ with ebitda :
633
+ fig = go .Figure (
634
+ data = [
635
+ go .Bar (
636
+ x = income_stmt .index ,
637
+ y = income_stmt ["EBITDA" ].values ,
638
+ name = "EBITDA" ,
639
+ marker_color = "dodgerblue" ,
640
+ marker = dict (cornerradius = "5%" ),
641
+ width = 0.4 ,
642
+ )
643
+ ]
644
+ )
645
+ fig .update_layout (xaxis = dict (type = "category" ), title = "EBITDA Evolution" )
646
+ st .plotly_chart (fig , use_container_width = True )
647
+
648
+ st .divider ()
649
+
541
650
# Render Income Statement Overview
542
651
st .markdown ("#### Income Statement Overview" )
543
652
st .write ("Hover over the table to download it as a CSV file" )
0 commit comments