draw line chart or bar chart with values