Commit 0f8ac4b2 authored by Samuël Weber's avatar Samuël Weber
Browse files

fix

parent 531ea622
......@@ -73,6 +73,7 @@ layout = dbc.Container(
width=9,
children=[
ac.get_options_estimate_component(),
dcc.Markdown("### First order estimator of OP from PM10 concentration"),
dcc.Loading(dcc.Graph(id="graph")),
ac.get_estimate_warning_component()
]
......@@ -131,6 +132,8 @@ def update_output(content, name, clicked):
else:
if content is not None:
data, columns, errors = parse_contents(content, name)
else:
raise PreventUpdate
colnames = [item['name'] for item in columns]
......@@ -167,7 +170,7 @@ def update_graph(dfpm, OPtype, temporality):
:returns: TODO
"""
if dfpm is None:
if dfpm is None or len(dfpm) == 0:
raise PreventUpdate
dfpm = pd.DataFrame(dfpm)
......@@ -194,5 +197,8 @@ def update_graph(dfpm, OPtype, temporality):
color="Factor",
color_discrete_map=colors
)
fig.update_yaxes(
{"title": "OP {} estimation (nmol.min⁻¹.m⁻³)".format(OPtype)}
)
return fig
......@@ -6,11 +6,11 @@
margin-top: 10px;
}
#main, h2 {
#main h2 {
color: darkmagenta;
}
#main, #graph-col h3 {
#main h3, #graph-col h3, .list-group-item-heading {
color: darkolivegreen;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment