drawchart(x,y) draws appropriate charts