From 4f5381bf41d6c3932b7df4771f75c94a502f3b8f Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Mon, 21 Jun 2021 16:00:58 +0200 Subject: [PATCH] some style fixes --- assets/style.css | 16 ++++++++++++++-- finance.py | 13 +++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/assets/style.css b/assets/style.css index 27aa47b..02cce79 100755 --- a/assets/style.css +++ b/assets/style.css @@ -245,7 +245,7 @@ a:hover { display: inline-block; height: 38px; padding: 0 30px; - color: #555; + color: #fff; text-align: center; font-size: 11px; font-weight: 600; @@ -485,7 +485,7 @@ a { padding-bottom: 12px; } .Select-control, .Select-menu-outer, .Select-multi-value-wrapper, .select-up, .is-open .Select-control { - background-color: #1E1E1E; + background-color: #1E1E1E !important; color: white; } @@ -631,4 +631,16 @@ a { /* Handle on hover */ ::-webkit-scrollbar-thumb:hover { background: #d8d8d870 !important; +} + + +/* OWN STYLES */ + +.gauges{ + display: flex; + flex-wrap: wrap; +} + +#average_gauge{ + flex-grow: 1; } \ No newline at end of file diff --git a/finance.py b/finance.py index 5c80b47..66a289b 100755 --- a/finance.py +++ b/finance.py @@ -117,14 +117,18 @@ app.layout = html.Div( style={'backgroundColor': '#1E1E1E'}, className='stockselector' ), - html.Button("Pobierz dane", id="btn_data"), + html.Button("Pobierz dane", id="btn_data",style={'margin-top': '3rem'}), dcc.Download(id="download-data") ], style={'color': '#1E1E1E'}), html.P('Wybierz przedział czasu by policzyć średnie i wachania'), - dcc.Graph(id='average_gauge'), - dcc.Graph(id='volatility_gauge'), + html.Div( + className='gauges', + children=[ + dcc.Graph(id='average_gauge'), + dcc.Graph(id='volatility_gauge') + ]), dash_table.DataTable( id='info_in_time_period', style_header={'backgroundColor': 'rgb(30, 30, 30)'}, @@ -153,7 +157,8 @@ app.layout = html.Div( # Callback for downloading file @app.callback( Output("download-data", "data"), - [Input("btn_data", "n_clicks"), Input('table_selector', 'value')], + Input("btn_data", "n_clicks"), + State('table_selector', 'value'), prevent_initial_call=True, ) def create_download_file(n_clicks, selected_table):