joshdavham commited on
Commit
c3b5101
·
1 Parent(s): 4a23deb

improve histogram

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -127,7 +127,7 @@ histogram = alt.Chart(video_df).mark_bar(
127
  vertical_lines = alt.Chart(line_data).mark_rule(
128
  color='red',
129
  strokeWidth=6,
130
- strokeDash = [5, 4], # first arg is length, second is gap
131
  ).encode(
132
  x='x:Q',
133
  tooltip=[
@@ -163,7 +163,8 @@ text_labels = alt.Chart(line_data).mark_text(
163
  scale=alt.Scale(range=['red', 'green', 'blue', 'orange']),
164
  sort=['Complete Beginner', 'Beginner', 'Intermediate', 'Advanced'],
165
  legend=None
166
- )
 
167
  )
168
 
169
 
 
127
  vertical_lines = alt.Chart(line_data).mark_rule(
128
  color='red',
129
  strokeWidth=6,
130
+ strokeDash = [10, 2], # first arg is length, second is gap
131
  ).encode(
132
  x='x:Q',
133
  tooltip=[
 
163
  scale=alt.Scale(range=['red', 'green', 'blue', 'orange']),
164
  sort=['Complete Beginner', 'Beginner', 'Intermediate', 'Advanced'],
165
  legend=None
166
+ ),
167
+ opacity=alt.condition(selection, alt.value(1.0), alt.value(0.1)), # Link opacity with selection
168
  )
169
 
170