Skip to content

Commit 068df94

Browse files
committed
Fix up chart breakage
1 parent dd230da commit 068df94

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

src/penn_chime/charts.py

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,10 @@ def build_admits_chart(
3030
.encode(x=alt.X(**x), y=alt.Y(**y), color=color, tooltip=tooltip)
3131
.mark_line(point=True)
3232
.encode(
33-
x=alt.X(**x_kwargs),
34-
y=alt.Y("value:Q", title="Daily admissions", scale=y_scale),
35-
color="key:N",
36-
tooltip=[
37-
tooltip_dict[as_date],
38-
alt.Tooltip("value:Q", format=".0f", title="Admissions"),
39-
"key:N",
40-
],
33+
x=alt.X(**x),
34+
y=alt.Y(**y),
35+
color=color,
36+
tooltip=tooltip,
4137
)
4238
.configure_legend(orient="bottom")
4339
.interactive()
@@ -71,14 +67,10 @@ def build_census_chart(
7167
.encode(x=alt.X(**x), y=alt.Y(**y), color=color, tooltip=tooltip)
7268
.mark_line(point=True)
7369
.encode(
74-
x=alt.X(**x_kwargs),
75-
y=alt.Y("value:Q", title="Census", scale=y_scale),
76-
color="key:N",
77-
tooltip=[
78-
idx,
79-
alt.Tooltip("value:Q", format=".0f", title="Census"),
80-
"key:N",
81-
],
70+
x=alt.X(**x),
71+
y=alt.Y(**y),
72+
color=color,
73+
tooltip=tooltip,
8274
)
8375
.configure_legend(orient="bottom")
8476
.interactive()
@@ -112,10 +104,10 @@ def build_sim_sir_w_date_chart(
112104
.encode(x=alt.X(**x), y=alt.Y(**y), color=color, tooltip=tooltip)
113105
.mark_line()
114106
.encode(
115-
x=alt.X(**x_kwargs),
116-
y=alt.Y("value:Q", title="Case Volume", scale=y_scale),
117-
tooltip=["key:N", "value:Q"],
118-
color="key:N",
107+
x=alt.X(**x),
108+
y=alt.Y(**y),
109+
color=color,
110+
tooltip=tooltip,
119111
)
120112
.configure_legend(orient="bottom")
121113
.interactive()

0 commit comments

Comments
 (0)