when select some distric, the bar chart will change accordingly