3. 7 Enhance chart functionality with time range controls and stability improvements
- Updated `app_new.py` to run the application in debug mode for stability. - Introduced a new time range control panel in `dashboard/components/chart_controls.py`, allowing users to select predefined time ranges and custom date ranges. - Enhanced chart callbacks in `dashboard/callbacks/charts.py` to handle time range inputs, ensuring accurate market statistics and analysis based on user selections. - Implemented logic to preserve chart state during updates, preventing resets of zoom/pan settings. - Updated market statistics display to reflect the selected time range, improving user experience and data relevance. - Added a clear button for custom date ranges to reset selections easily. - Enhanced documentation to reflect the new time range features and usage guidelines.
This commit is contained in:
@@ -10,7 +10,7 @@ from components.charts.indicator_manager import get_indicator_manager
|
||||
from components.charts.indicator_defaults import ensure_default_indicators
|
||||
from dashboard.components.chart_controls import (
|
||||
create_chart_config_panel,
|
||||
create_auto_update_control
|
||||
create_time_range_controls
|
||||
)
|
||||
|
||||
logger = get_logger("default_logger")
|
||||
@@ -79,7 +79,7 @@ def get_market_data_layout():
|
||||
|
||||
# Create components using the new modular functions
|
||||
chart_config_panel = create_chart_config_panel(strategy_options, overlay_options, subplot_options)
|
||||
auto_update_control = create_auto_update_control()
|
||||
time_range_controls = create_time_range_controls()
|
||||
|
||||
return html.Div([
|
||||
# Title and basic controls
|
||||
@@ -112,8 +112,8 @@ def get_market_data_layout():
|
||||
# Chart Configuration Panel
|
||||
chart_config_panel,
|
||||
|
||||
# Auto-update control
|
||||
auto_update_control,
|
||||
# Time Range Controls (positioned under indicators, next to chart)
|
||||
time_range_controls,
|
||||
|
||||
# Chart
|
||||
dcc.Graph(id='price-chart'),
|
||||
|
||||
Reference in New Issue
Block a user