Commit a721ff02 authored by Samuel's avatar Samuel
Browse files

add lot of stuff

parent 574c67d0
......@@ -213,14 +213,14 @@ def get_options_component():
])
return options_component
def get_boxplot_options_component():
def get_boxplot_options_component(id=None):
boxplot_options_component = html.Div(
id="boxplot-options",
id=id+"-boxplot-options" if id else "boxplot-options",
children=[
html.Div([
html.Label('Graph type: '),
dcc.RadioItems(
id='boxplot-options-graph-type',
id=id+'-boxplot-options-graph-type' if id else 'boxplot-options-graph-type',
className='options-items',
options=[
{'label': 'boxplot', 'value': 'boxplot'},
......@@ -232,7 +232,7 @@ def get_boxplot_options_component():
html.Div([
html.Label('Group by: '),
dcc.RadioItems(
id='boxplot-options-groupby',
id=id+'-boxplot-options-groupby' if id else 'boxplot-options-groupby',
className='options-items',
options=[
{'label': 'date', 'value': 'date'},
......@@ -246,43 +246,51 @@ def get_boxplot_options_component():
return boxplot_options_component
def get_timeserie_component():
timeserie_component = html.Div(
monthly_boxplot_component = [
get_boxplot_options_component(id="monthly"),
dcc.Loading(
dcc.Graph(
id='monthly-box-graph',
figure={'data': [], 'layout': {'title': 'Seasonal variation'}}
)
)
]
seasonal_boxplot_component = [
get_boxplot_options_component(id="seasonal"),
dcc.Loading(
dcc.Graph(
id='seasonal-box-graph',
figure={'data': [], 'layout': {'title': 'Seasonal variation'}}
)
)
]
timeserie_component = [
dcc.Loading(
dcc.Graph(
id='ts-graph',
figure={'data': [], 'layout': {'title': 'Time serie(s)'}}
)
)
]
rawdata_component = html.Div(
id='tab-timeserie',
children=[
# plots_options,
html.Div(
children=[
dcc.Loading([
dcc.Graph(
id='ts-graph',
figure={'data': [], 'layout': {'title': 'Time serie(s)'}}
)
])
]
),
html.Div(
children=[
dcc.Tabs(
value="1",
id="tab-boxplot",
value="timeserie",
id="tab-rawdata",
children=[
dcc.Tab(label="Seasonal", value="1"),
dcc.Tab(label="Monthly", value="2"),
dcc.Tab(label="Timeserie", value="timeserie", children=timeserie_component),
dcc.Tab(label="Monthly", value="monthly", children=monthly_boxplot_component),
dcc.Tab(label="Seasonal", value="seasonal", children=seasonal_boxplot_component),
]
),
get_boxplot_options_component(),
dcc.Loading(
dcc.Graph(
id='box-graph',
figure={'data': [], 'layout': {'title': 'Seasonal variation'}}
)
),
]
)
]
)
return timeserie_component
return rawdata_component
def get_profile_component():
profile_component = html.Div(
......@@ -418,6 +426,25 @@ def get_model_component():
)
return model_component
def get_op_contribution_component():
"""TODO: Docstring for get_op_contribution_component.
:returns: TODO
"""
contribution_component = html.Div(
id="op-contribution-component",
children=[
dcc.Graph(
id="op-contribution-graph",
figure={
'data': [],
'layout': {'title': 'OP contribution'}
}
)
]
)
return contribution_component
def get_map_component(stations):
"""TODO: Docstring for get_map_component.
......
This diff is collapsed.
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