This commit is contained in:
tomgwang 2024-09-26 15:05:04 -07:00
parent 654ef5ea32
commit 7dadea010b

View File

@ -676,21 +676,21 @@ if __name__ == "__main__":
# App layout
app.layout = [
# html.Button('Refresh Data', id='button', n_clicks=0),
html.Button('Auto Play', id="start-button", n_clicks=0),
# html.Div(children='Pick A Symbol from Dropdown List: '),
# html.Hr(),
# dcc.RadioItems(options=['pop', 'lifeExp', 'gdpPercap'], value='lifeExp', id='symbols_dropdown_list'),
# dcc.Dropdown(['pop', 'lifeExp', 'gdpPercap'], 'lifeExp', id='symbols_dropdown_list'),
dcc.Dropdown(symbols, symbols[0], id='symbols_dropdown_list'),
# dash_table.DataTable(data=df.to_dict('records'), page_size=6),
html.Div([
html.Div([
dcc.Dropdown(symbols, symbols[0], id='symbols_dropdown_list',),
], style={'width': '140px', 'text-align': 'center'}),
html.Button('Auto Play', id="start-button", n_clicks=0,
style={'font-size': '12px', 'width': '140px', 'display': 'inline-block', 'margin-bottom': '10px', 'margin-right': '5px', 'height':'36px', 'verticalAlign': 'top'}),
], style={'display':'flex', 'justify-content':'center'}),
dcc.Graph(
figure={},
id='controls-and-graph',
style={'height':'85vh'}
),
# dcc.Store(id="signal"),
dcc.Store(id="dropdown_index", data='0'),
# dcc.Store(id="dropdown_index", data='0'),
dcc.Interval(
id='interval-component',
interval=3*1000, # in milliseconds
@ -833,7 +833,7 @@ if __name__ == "__main__":
fig.layout.yaxis3.title="MACD"
fig.layout.yaxis4.title="RSI/VoRSI"
fig.update_layout(title_text=plot_ind)
fig.update_layout(title_text=plot_ind, title_x=0.5)
# fig.update_layout(showlegend=False)
fig.update_layout(margin=dict(l=30, r=20, t=50, b=20))