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