Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mattyweb/issue1060 #1063

Merged
merged 2 commits into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions server/dash/dashboards/types_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def display_choropleth(selected_value):
color_continuous_scale=px.colors.sequential.YlOrRd,
labels=LABELS,
projection="mercator",
height=1000,
)
# show only the relevant map
fig.update_geos(
Expand All @@ -74,16 +73,17 @@ def display_choropleth(selected_value):
)
# crops/zooms it
fig.update_layout(
autosize=True,
margin={"r": 0, "t": 0, "l": 0, "b": 0},
)
# move the scale to bottom left
fig.update_coloraxes(
# showscale=False
colorbar_x=0.25,
colorbar_y=0.25,
colorbar_ypad=15,
colorbar_x=0.225,
colorbar_y=0.225,
# colorbar_ypad=10,
colorbar_lenmode="fraction",
colorbar_len=0.25,
colorbar_len=0.3,
)
apply_figure_style(fig)
return fig, "visible-graph"
17 changes: 15 additions & 2 deletions server/dash/static/reports.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ body {
color: #ececec;
background-color: #0f181f;
font-family: 'Robota, Gill Sans', 'Gill Sans MT', sans-serif;
font-size: 11pt;
font-size: 1em;
font-weight: 300;
}
h1 {
Expand All @@ -13,13 +13,23 @@ h1 {
.hidden-graph {
visibility: hidden;
}
#choropleth > .svg-container {
margin-left: auto;
margin-right: auto;
}
#choropleth > .js-plotly-plot .plotly div {
margin-left: auto;
margin-right: auto;
}
.dash-dropdown {
margin: 20pt;
color: #0f181f;
}
.dash-links a {
display: flex;
font-size: 1.2em;
padding: 12pt 10pt;
color: white;
padding: 5px;
}
._dash-loading {
display: none;
Expand Down Expand Up @@ -60,4 +70,7 @@ h1 {
.half-graph {
flex: 1;
}
#choropleth {
height: 800px;
}
}