Add docs and change route names
This commit is contained in:
parent
36e622dbd9
commit
b872abfdf5
32
main.py
32
main.py
@ -30,8 +30,8 @@ sidebar = html.Div(
|
|||||||
dbc.Nav(
|
dbc.Nav(
|
||||||
[
|
[
|
||||||
dbc.NavLink("Main Dashboard", href="/", active="exact"),
|
dbc.NavLink("Main Dashboard", href="/", active="exact"),
|
||||||
dbc.NavLink("Data Explorer", href="/page-1", active="exact"),
|
dbc.NavLink("Data Explorer", href="/explorer", active="exact"),
|
||||||
dbc.NavLink("Documentation", href="/page-2", active="exact"),
|
dbc.NavLink("Documentation", href="/docs", active="exact"),
|
||||||
],
|
],
|
||||||
vertical=True,
|
vertical=True,
|
||||||
pills=True,
|
pills=True,
|
||||||
@ -106,7 +106,7 @@ def render_page_content(pathname):
|
|||||||
className="graphs"
|
className="graphs"
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
elif pathname == "/page-1":
|
elif pathname == "/explorer":
|
||||||
return [
|
return [
|
||||||
html.H1('Data explorer'),
|
html.H1('Data explorer'),
|
||||||
dash_table.DataTable(
|
dash_table.DataTable(
|
||||||
@ -136,20 +136,26 @@ def render_page_content(pathname):
|
|||||||
style_data={
|
style_data={
|
||||||
'backgroundColor': 'rgb(50, 50, 50)',
|
'backgroundColor': 'rgb(50, 50, 50)',
|
||||||
'color': 'white'
|
'color': 'white'
|
||||||
},
|
|
||||||
style_cell={
|
|
||||||
'color': 'white'
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
elif pathname == "/page-2":
|
elif pathname == "/docs":
|
||||||
return [
|
return [
|
||||||
html.H1('High School in Iran',
|
html.H1('Documentation',
|
||||||
style={'textAlign':'center'}),
|
style={'textAlign':'center'}),
|
||||||
dcc.Graph(id='bargraph',
|
html.P('This dataset contains +150000 observations about cars for sale from otomoto.pl site.'),
|
||||||
figure=px.bar(df, barmode='group', x='Years',
|
html.P('Each row describes a single car. There are 7 features:'),
|
||||||
y=['Girls High School', 'Boys High School']))
|
html.Ul([
|
||||||
]
|
html.Li('- mark'),
|
||||||
|
html.Li('- model'),
|
||||||
|
html.Li('- price (in PLN)'),
|
||||||
|
html.Li('- year'),
|
||||||
|
html.Li('- milage (in KM)'),
|
||||||
|
html.Li('- vol_engine (in DM^3)'),
|
||||||
|
html.Li('- fuel (type of fuel)')
|
||||||
|
])
|
||||||
|
]
|
||||||
|
|
||||||
# If the user tries to reach a different page, return a 404 message
|
# If the user tries to reach a different page, return a 404 message
|
||||||
return dbc.Jumbotron(
|
return dbc.Jumbotron(
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user