Commit ·
44926bc
1
Parent(s): 196cdf6
Fix arrow colors and make them bigger
Browse files- Green up arrows (▲) for profits - correctly colored green now\!
- Red down arrows (▼) for losses
- Made arrows 1.4x bigger (font-size: 1.4em)
- Fixed arrow color logic to match profit/loss correctly
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -434,11 +434,11 @@ def refresh_investment_performance_table():
|
|
| 434 |
|
| 435 |
# Format P&L with arrows and colors
|
| 436 |
if pl_dollars > 0:
|
| 437 |
-
pl_arrow = "
|
| 438 |
pl_color = "#00d647"
|
| 439 |
row_bg = "rgba(0, 214, 71, 0.1)"
|
| 440 |
elif pl_dollars < 0:
|
| 441 |
-
pl_arrow = "
|
| 442 |
pl_color = "#ff0080"
|
| 443 |
row_bg = "rgba(255, 0, 128, 0.1)"
|
| 444 |
else:
|
|
@@ -447,8 +447,8 @@ def refresh_investment_performance_table():
|
|
| 447 |
row_bg = "rgba(139, 148, 158, 0.05)"
|
| 448 |
|
| 449 |
# Format P&L values with styled arrows
|
| 450 |
-
pl_dollar_str = f"<span style='color: {pl_color}; font-weight: 600;'>
|
| 451 |
-
pl_percent_str = f"<span style='color: {pl_color}; font-weight: 600;'>{
|
| 452 |
|
| 453 |
invested_data.append({
|
| 454 |
'Symbol': symbol,
|
|
@@ -488,9 +488,9 @@ def refresh_investment_performance_html():
|
|
| 488 |
# Determine row class based on P&L
|
| 489 |
row_class = ""
|
| 490 |
pl_str = str(row.get('P&L ($)', ''))
|
| 491 |
-
if '
|
| 492 |
row_class = "profit-row"
|
| 493 |
-
elif '
|
| 494 |
row_class = "loss-row"
|
| 495 |
else:
|
| 496 |
row_class = "neutral-row"
|
|
|
|
| 434 |
|
| 435 |
# Format P&L with arrows and colors
|
| 436 |
if pl_dollars > 0:
|
| 437 |
+
pl_arrow = "<span style='color: #00d647; font-size: 1.4em;'>▲</span>"
|
| 438 |
pl_color = "#00d647"
|
| 439 |
row_bg = "rgba(0, 214, 71, 0.1)"
|
| 440 |
elif pl_dollars < 0:
|
| 441 |
+
pl_arrow = "<span style='color: #ff0080; font-size: 1.4em;'>▼</span>"
|
| 442 |
pl_color = "#ff0080"
|
| 443 |
row_bg = "rgba(255, 0, 128, 0.1)"
|
| 444 |
else:
|
|
|
|
| 447 |
row_bg = "rgba(139, 148, 158, 0.05)"
|
| 448 |
|
| 449 |
# Format P&L values with styled arrows
|
| 450 |
+
pl_dollar_str = f"{pl_arrow} <span style='color: {pl_color}; font-weight: 600;'>${abs(pl_dollars):.2f}</span>"
|
| 451 |
+
pl_percent_str = f"{pl_arrow} <span style='color: {pl_color}; font-weight: 600;'>{abs(pl_percent):.2f}%</span>"
|
| 452 |
|
| 453 |
invested_data.append({
|
| 454 |
'Symbol': symbol,
|
|
|
|
| 488 |
# Determine row class based on P&L
|
| 489 |
row_class = ""
|
| 490 |
pl_str = str(row.get('P&L ($)', ''))
|
| 491 |
+
if '▲' in pl_str:
|
| 492 |
row_class = "profit-row"
|
| 493 |
+
elif '▼' in pl_str:
|
| 494 |
row_class = "loss-row"
|
| 495 |
else:
|
| 496 |
row_class = "neutral-row"
|