+
+# base = base.encode(alt.Color(field='color',type='nominal',scale=alt.Scale(scheme='category10')))
+
+ cluster_dropdown = alt.binding_select(options=[str(c) for c in sorted(set(plot_data.cluster))])
+
+ subreddit_dropdown = alt.binding_select(options=sorted(plot_data.subreddit))
+
+ cluster_click_select = alt.selection_single(on='click',fields=['cluster'], bind=cluster_dropdown, name=' ')
+ # cluster_select = alt.selection_single(fields=['cluster'], bind=cluster_dropdown, name='cluster')
+ # cluster_select_and = cluster_click_select & cluster_select
+ #
+ # subreddit_select = alt.selection_single(on='click',fields=['subreddit'],bind=subreddit_dropdown,name='subreddit_click')
+
+ color = alt.condition(cluster_click_select ,
+ alt.Color(field='color',type='nominal',scale=alt.Scale(scheme='category10')),
+ alt.value("lightgray"))
+
+