get controls working well
calculate bar chart