Skip to content

Commit

Permalink
fix adaptation loading due to charts no value
Browse files Browse the repository at this point in the history
  • Loading branch information
chjch committed Feb 29, 2024
1 parent a267e8e commit 79c517f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/pages/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def update_intro_msg(pathname):
)
def update_line_chart(pathname, y_value):
pathname = "/" + pathname.split("/")[-1]
if pathname == "/housing":
if pathname == "/housing" or pathname == "/adaptation":
return line_chart(
"HOUSING",
y_slider_marks[y_value]["label"],
Expand Down Expand Up @@ -548,7 +548,7 @@ def update_bar_chart(hoverdata, pathname, y_value, x_value):
else:
year = hoverdata["points"][0]["x"]
scenario = hoverdata["points"][0]["customdata"][0]
if pathname == "/housing":
if pathname == "/housing" or pathname == "/adaptation":
return bar_chart("HOUSING", scenario, year)
elif pathname == "/critical-infrastructure":
return bar_chart("CRITICAL INFRASTRUCTURE", scenario, year)
Expand Down

0 comments on commit 79c517f

Please sign in to comment.