mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
Improve stock chart display: Reduce chart height and adjust spacing to prevent text overlap
This commit is contained in:
@@ -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}"
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user