For Evil Trout blog part 2: switch between bar chart and table