Skip to content

Commit

Permalink
✨ Set xrange to the one requested during zoom.
Browse files Browse the repository at this point in the history
  • Loading branch information
dalonsoa committed Oct 18, 2024
1 parent 5b9ee32 commit c106d5d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions measurement/dash_apps/data_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ def update_graph(
variable_name=Variable.objects.get(variable_code=variable).name,
station_code=station,
)
if "xaxis.range[0]" in relayout_data:
plot["layout"]["xaxis"]["range"] = [
relayout_data["xaxis.range[0]"],
relayout_data["xaxis.range[1]"],
]
return plot

except Exception as e:
Expand Down

0 comments on commit c106d5d

Please sign in to comment.