file-styles-new-graph #1

Merged
s434749 merged 5 commits from file-styles-new-graph into master 2021-06-22 07:42:20 +02:00
2 changed files with 26 additions and 1 deletions
Showing only changes of commit 2ddca0725c - Show all commits

View File

@ -644,3 +644,15 @@ a {
#average_gauge{ #average_gauge{
flex-grow: 1; flex-grow: 1;
} }
#tab-1, #tab-2{
background-color: #1E1E1E;
color: #fff;
border-left: none;
border-right: none;
border-bottom: none;
}
.tab--selected{
background-color: #111111 !important;
}

View File

@ -140,7 +140,14 @@ app.layout = html.Div(
]), ]),
html.Div(className='eight columns div-for-charts bg-grey', html.Div(className='eight columns div-for-charts bg-grey',
children=[ children=[
dcc.Graph(id='timeseries', config={'displayModeBar': False}, animate=True), dcc.Tabs(id='tabs', value='tab-1', children=[
dcc.Tab(id='tab-1', label='Chart 1', value='tab-1', children=[
dcc.Graph(id='timeseries', config={'displayModeBar': False}, animate=True),
]),
dcc.Tab(id='tab-2', label='Chart 2', value='tab-2',children=[
dcc.Graph(id='price-dividends', config={'displayModeBar': False}, animate=True),
]),
]),
dash_table.DataTable( dash_table.DataTable(
id='stock_price_table', id='stock_price_table',
style_header={'backgroundColor': 'rgb(30, 30, 30)'}, style_header={'backgroundColor': 'rgb(30, 30, 30)'},
@ -239,6 +246,12 @@ def change_time_period(selectedData):
volatility_gauge = make_gauge('wolatylność', 0, std['Close'], 400) volatility_gauge = make_gauge('wolatylność', 0, std['Close'], 400)
return average_gauge, volatility_gauge, stock_info_in_time_period_df.T.to_dict('records') return average_gauge, volatility_gauge, stock_info_in_time_period_df.T.to_dict('records')
@app.callback(Output('price-dividends', 'figure'),
[Input('table_selector', 'value')])
def update_point_chart(selected_dropdown_value):
selected_stock_in_table_df = fullTableDf.xs(selected_dropdown_value, axis=1, level=1)
figure = px.scatter(selected_stock_in_table_df, x='Volume', y='Dividends', template='plotly_dark')
return figure
if __name__ == '__main__': if __name__ == '__main__':
app.run_server(debug=True) app.run_server(debug=True)