lekimngan3010 commited on
Commit
099aa6b
·
verified ·
1 Parent(s): 569ef62

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +0 -2
src/streamlit_app.py CHANGED
@@ -98,11 +98,9 @@ heatmap = alt.Chart(df).mark_rect().encode(
98
 
99
  # 3. Bar Chart
100
  bar_chart = alt.Chart(df).mark_bar().encode(
101
- # Use the aggregated field name here
102
  x=alt.X('total_votes:Q', title='Total Popularity (Votes)'),
103
  y=alt.Y('directorName:N', sort='-x', title='Director', axis=alt.Axis(labelLimit=200)),
104
  color=alt.value('#4682B4'),
105
- # Changed 'sum(numVotes)' to 'total_votes'
106
  tooltip=['directorName', alt.Tooltip('total_votes:Q', format=',')]
107
  ).transform_filter(
108
  selection # Ensure 'selection' is defined above this block!
 
98
 
99
  # 3. Bar Chart
100
  bar_chart = alt.Chart(df).mark_bar().encode(
 
101
  x=alt.X('total_votes:Q', title='Total Popularity (Votes)'),
102
  y=alt.Y('directorName:N', sort='-x', title='Director', axis=alt.Axis(labelLimit=200)),
103
  color=alt.value('#4682B4'),
 
104
  tooltip=['directorName', alt.Tooltip('total_votes:Q', format=',')]
105
  ).transform_filter(
106
  selection # Ensure 'selection' is defined above this block!