joshdavham commited on
Commit
1354591
·
1 Parent(s): 1c61d89

add button for optional display of medians

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -161,7 +161,10 @@ text_labels = alt.Chart(line_data).mark_text(
161
  )
162
  )
163
 
164
- #layered_chart = alt.layer(histogram, background='#f6f8fb')
165
- layered_chart = alt.layer(histogram, vertical_lines, text_labels, background='#f6f8fb')
 
 
 
166
 
167
  st.altair_chart(layered_chart, use_container_width=True)
 
161
  )
162
  )
163
 
164
+
165
+ if st.checkbox('Show medians'):
166
+ layered_chart = alt.layer(histogram, vertical_lines, text_labels, background='#f6f8fb')
167
+ else:
168
+ layered_chart = alt.layer(histogram, background='#f6f8fb')
169
 
170
  st.altair_chart(layered_chart, use_container_width=True)