Improve stock chart display: Reduce chart height and adjust spacing to prevent text overlap

This commit is contained in:
ChuckBuilds
2025-04-11 11:19:17 -05:00
parent 1f867e60f3
commit 2f27b5f01d
2 changed files with 5 additions and 5 deletions

View File

@@ -35,12 +35,12 @@
} }
}, },
"clock": { "clock": {
"enabled": true, "enabled": false,
"format": "%H:%M:%S", "format": "%H:%M:%S",
"update_interval": 1 "update_interval": 1
}, },
"weather": { "weather": {
"enabled": true, "enabled": false,
"update_interval": 300, "update_interval": 300,
"units": "imperial", "units": "imperial",
"display_format": "{temp}°F\n{condition}" "display_format": "{temp}°F\n{condition}"

View File

@@ -179,8 +179,8 @@ class StockManager:
) )
# Calculate chart dimensions # Calculate chart dimensions
chart_height = 22 # Increased height since we're using smaller fonts chart_height = 16 # Reduced from 22 to make chart smaller
chart_y = 7 # Start closer to symbol due to smaller font chart_y = 8 # Slightly adjusted starting position
width = self.display_manager.matrix.width width = self.display_manager.matrix.width
# Get min and max prices for scaling # Get min and max prices for scaling
@@ -213,7 +213,7 @@ class StockManager:
price_text = f"${data['price']:.2f} ({data['change']:+.1f}%)" price_text = f"${data['price']:.2f} ({data['change']:+.1f}%)"
self.display_manager.draw_text( self.display_manager.draw_text(
price_text, price_text,
y=30, # Near bottom y=28, # Moved down slightly from 30 to give more space
color=color, color=color,
small_font=True # Use small font small_font=True # Use small font
) )