Skip to content

Commit a133785

Browse files
committed
fix: lighthouse runs page
1 parent d0f184a commit a133785

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/perf/lighthouse_runs.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ def get_lighthouse_results(commit_hash: str) -> tuple:
134134
# Calculate rolling mean
135135
df["rolling_mean"] = df.groupby("app_name")["score"].transform(lambda x: x.rolling(window=5, min_periods=1).mean())
136136

137+
points_selection = alt.selection_point(
138+
name="points",
139+
fields=["commit_sha_full"],
140+
on="click",
141+
clear="dblclick",
142+
toggle=False,
143+
)
144+
137145
chart = (
138146
alt.Chart(df)
139147
.mark_point()
@@ -148,6 +156,7 @@ def get_lighthouse_results(commit_hash: str) -> tuple:
148156
tooltip=["datetime:T", "score:Q", "app_name:N", "commit_hash:N"],
149157
)
150158
.properties(title="Lighthouse Scores Over Time")
159+
.add_params(points_selection)
151160
)
152161

153162
rolling_mean_line = (

0 commit comments

Comments
 (0)